BALTIMORE -- The last time the Red Sox visited Baltimore, the last-place Orioles battled back to win on the final day of the 2011 season, preventing Boston from sneaking into the playoffs.
On Monday, last-place Boston rallied from a three-run deficit to beat the American League East-leading Orioles 8-6 in a series opener at Oriole Park at Camden Yards.
David Ortiz hit a monstrous, 442-foot home run on a 3-1 pitch from Orioles starter Tommy Hunter to lead off the sixth inning. The blast touched off a three-run rally, tying the game at 5. Boston would score two more runs in the seventh to take the lead.
Boston (21-21) earned its third consecutive win. The Red Sox have won nine of their past 11 games.
The loss was a second straight for the Orioles (27-16).
Hunter allowed five runs on nine hits in six innings. He struck out three and walked none on 96 pitches. The Orioles bullpen allowed an uncharacteristic three runs as Boston tacked on insurance. Kevin Gregg (2-2) allowed two earned runs on three hits in one inning.
Adrian Gonzalez hit a sacrifice fly to score Mike Aviles with the go-ahead run in the seventh. Will Middlebrooks' single drove home Dustin Pedroia to give Boston a 7-5 lead.
Pedroia singled home Che-Hsuan Lin in the eighth.
The Orioles clawed back to within two on Matt Wieters' RBI single, scoring Nick Markakis with no outs in the bottom of the eighth.
Alfredo Aceves threw a perfect ninth to close out the win and pick up his 10th save.
Andrew Miller (1-0) threw 1 2/3 innings of perfect relief, striking out two. He was the first of four relievers to follow Clay Buchholz, who allowed five runs on six hits and four walks in 5 1/3 innings. Buchholz struck out two, throwing 94 pitches.
Boston built a two-run lead in the top of the third. Aviles singled to center to score Daniel Nava, moving Marlon Byrd to third base. Byrd would score shortly thereafter, as Pedroia hit a fly ball deep enough to right field to bring him home.
The Orioles fired back in the bottom half of the inning, scoring four runs without getting a ball out of the infield. The outburst was powered by two bases-loaded walks, an infield single and a double-play groundout.
Xavier Avery drew a walk to force in Wilson Betemit. J.J. Hardy reached on an infield single to shortstop, scoring Nick Johnson. Nick Markakis drew a second run-scoring walk of the inning, as Robert Andino came home to give the Orioles a lead. Adam Jones ended the scoring, grounding into a double play to bring Avery home.
Baltimore's fifth run was more conventional. Chris Davis hit a solo shot in the fourth, leading off the inning by driving an 0-1 pitch out of the park.
Boston tied things in the top of the sixth when Ortiz homered to deep right field, testing the distance to the B&O Warehouse beyond the out-of-town scoreboard. Nava drove home Gonzalez with a sacrifice fly and sent Middlebrooks to third. Middlebrooks later scored on a balk by Hunter.
NOTES: Orioles second baseman Brian Roberts (headaches) is close to appearing in a minor league rehab assignment. Roberts hasn't played since suffering a concussion last May in Boston ... Orioles left-hander Zach Britton threw 79 pitches Monday in extended spring training in Sarasota, Fla., and could report to a minor league affiliate for a rehab start on Saturday ... Red Sox outfielder Cody Ross will be out for six to eight weeks with a left foot fracture. He is expected to be placed on the disabled list Tuesday.