BALTIMORE — The Baltimore Orioles seem to bring out the best in Mookie Betts.

Betts homered twice and drove in five runs, a performance that almost single-handedly carried the Boston Red Sox to a 5-3 victory Tuesday night.

Boston’s cleanup hitter launched a three-run drive in the fifth inning and added a tiebreaking two-run shot in the seventh. Betts is batting .426 with 12 homers and 18 RBIs in 11 games against the Orioles this season.

Exactly one-quarter of his 28 home runs this season have come in Baltimore, where the left-field foul line is a mere 333 feet from the plate.

“He feels comfortable in this ballpark and obviously sees the ball well,” Boston manager John Farrell said.

Maybe that’s the reason for his success. Maybe not.

“I’m going to continue to say I don’t know why,” Betts said. “I’m just trying to put good swings on it and enjoy it.”

Betts had three homers and eight RBIs in a 16-2 win over Arizona on Sunday, so it’s not as if he’s only picking on the Orioles.

“I’m sure there are some numbers to dictate that it’s more us,” manager Buck Showalter said, “but he’s been having that type of year against most everybody.”

The victory lifted Boston into a tie with Baltimore in the AL East, one game behind division-leading Toronto.

“We all are well aware of what is at stake, where we are in the standings and who is around us,” Farrell said.

The Red Sox were in first place on July 21, then lost 13 of 20 before their current streak of five wins in row.

Boston starter Eduardo Rodriguez had a no-hitter before leaving in the fifth inning with left hamstring tightness. The Red Sox hope they caught it early enough to keep the lefty in the rotation without missing a turn.

Matt Barnes kept the Orioles hitless until Steve Pearce reached on a dribbler that got past the mound with one out in the seventh.

Baltimore ended up batting around and tying the game at 3. After Matt Wieters hit a two-run single, Brad Ziegler (1-3) walked Adam Jones with the bases loaded before striking out Jonathan Schoop.

The deadlock didn’t last long. David Ortiz led off the eighth with a single against Brad Brach (7-2) and Betts lined an 0-1 pitch into the front row of seats beyond the left-field wall.

Craig Kimbrel, the sixth Boston pitcher, worked a perfect ninth for his 21st save.

Rodriguez and Yovani Gallardo were locked in a scoreless duel until the fifth. After Andrew Benintendi hit a leadoff double and Xander Bogaerts drew a one-out walk, Gallardo struck out Ortiz with a 2-2 fastball. Betts hit the next pitch over the left-field wall.

Gallardo lasted five innings, surviving a line shot off his right forearm in the fifth.

“It got me pretty good,” he said. “It’s a little stiff, but I’ll be all right.”

PAPELBON RUMOR

Red Sox manager John Farrell confirmed that the team has had discussions with reliever Jonathan Papelbon, who was recently released by Washington. Papelbon pitched for Boston from 2005-11, primarily as a closer, but would not hold that same role if he returned, Farrell said.

TRAINER’S ROOM

Red Sox: 3B Aaron Hill was scratched shortly before game time with right forearm tightness. … RHP Steven Wright (right shoulder strain) will come off the DL next Tuesday, Farrell said. … There is no timetable for RHP Koji Uehara (right pectoral strain) to throw off a mound, but he “is doing better than anticipated,” Farrell said. … OF/C Blake Swihart underwent successful surgery on his left ankle Monday and is expected to be ready for spring training in 2017.

Orioles: Manager Buck Showalter expects reliever Darren O’Day (rotator cuff strain) to spend the minimum time on the DL and return on Aug. 27. … LHP T.J. McFarland (inflamed left knee) gave up four hits and three runs in 1/3 inning for Class A Frederick in his first rehab game.

UP NEXT

Red Sox: LHP David Price (10-8. 4.29 ERA) starts in the finale of the series Wednesday night. Price has gone at least eight innings in eight of his 25 starts.

Orioles: RHP Chris Tillman (15-4, 3.46) makes his 20th career start against the Red Sox. He’s 10-3 with a 2.74 ERA versus Boston, including 1-0 this season.