BALTIMORE -- David Ortiz homered in the sixth inning to start Boston's comeback from a three-run deficit, and the Red Sox got three hits from Will Middlebrooks in an 8-6 victory over the Baltimore Orioles on Mon day night.
Dustin Pedroia had two RBIs and Mike Aviles scored the go-ahead run in the seventh to help Boston secure its ninth win in 11 games. The Red Sox are tied with the New York Yankees in the AL East cellar but are at .500 (21-21) for the first time since April 30.
Chris Davis homered for the first-place Orioles, who swept a three-game series in Fenway Park earlier this month. It was the first meeting between the teams in Baltimore since the Orioles ruined Boston's chances of reaching the playoffs with a walkoff win on the final day of the 2011 regular season.
Boston trailed 5-2 in the sixth before Ortiz launched a drive that was so obviously gone that right fielder Nick Markakis didn't even turn around to see it become the 62nd homer in the 21-year history of Camden Yards to land on Eutaw Street. Adrian Gonzalez followed with a double and Daniel Nada hit a sacrifice fly before starter Tommy Hunter balked in a run to tie it.
The Red Sox went up 7-5 in the seventh against Kevin Gregg (2-2).
Aviles hit a one-out single and took third on a double by Pedroia before Ortiz received an intentional walk to load the bases. Gonzalez followed with a sacrifice fly and Middlebrooks added an RBI single.
In the bottom half, Matt Wieters snapped an 0-for-20 skid with an RBI single off Rich Hill, whose run of eight straight hitless outings ended. But with runners at second and third and one out, Vicente Padilla retired Wilson Betemit on a short fly and struck out Nick Johnson. Padilla has stranded all 15 inherited runners this year.
Alfredo Aceves worked the ninth for his 10th save.
After Boston starter Clay Buchholz gave up five runs in 5 1-3 innings, Andrew Miller (1-0) retired all five batters he faced to earn the win on his 27th birthday.
Boston used a run-scoring single by Aviles and Pedroia's sacrifice fly to take a 2-0 lead in the third.
Baltimore answered with four runs in the bottom half despite hitting only one ball out of the infield. After Betemit singled to right, a walk and Robert Andino's bunt single loaded the bases. Buchholz then walked in a run, gave up an infield single and issued another bases-loaded walk. The final run came in when Adam Jones hit into a 6-4-3 double play.
Davis hit his sixth home run, the first in three weeks, to make it 5-2 in the fourth.