BOSTON -- Manny Machado hit a three-run homer as Baltimore rallied for five runs in the ninth inning of an 8-5 win over the Boston Red Sox on Wednesday, ending the Orioles' four-game losing streak.
Chris Davis led off the eighth with a home run off closer Joel Hanrahan (0-1), whose attempt at his second save of the season unraveled in disaster. Hanrahan allowed a two-out single to Ryan Flaherty, then loaded the bases by walking Nolan Reimold and Nate McLouth.
Hanrahan's first pitch to Machado was in the dirt and allowed pinch-runner Alexi Casilla to tie the game at 5-all, then Machado blasted the next pitch he saw for a homer to left, clearing the bases and giving the Orioles an 8-5 lead in a game they were one strike away from losing.
Darren O'Day (1-0) got the win and Jim Johnson got his third save of the season for the Orioles, who hadn't won since April 5.
Daniel Nava and Jarrod Saltalamacchia hit back-to-back homers in the sixth to break a 3-all tie after a 43-minute rain delay after the fifth inning.
Nick Markakis also homered for Baltimore in the game, which marked the official end to the Red Sox' consecutive sellout streak of 820 games, including playoffs. Nava homered for the third straight game, two nights after hitting a three-run shot in the seventh in Boston's 3-1 win Monday in the series opener.
Ryan Dempster was strong in his Fenway Park debut for the Red Sox, striking out seven and holding Baltimore to three hits in five innings. Markakis' leadoff homer in the fourth was the only earned run allowed by Dempster.
Baltimore starter Jake Arrieta also did no return after the rain delay. He was replaced by Tommy Hunter, who started the sixth with two quick strike outs before facing Nava and Saltalamacchia. Nava drove a 1-1 pitch over the Green Monster to break a 3-all tie. Hunter had a 1-2 count on Saltalamacchia before the Boston catcher hit a shot to right for his first homer of the year.
Jacoby Ellsbury hit an RBI triple in the first and Shane Victorino drove in a run with a sacrifice fly, but his run of reaching base in every game as a member of the Red Sox ended at seven straight games.
Baltimore's Adam Jones extended his hitting streak to nine straight games, dating back to last season, despite striking out three times.
The rain picked up in the fifth and the umpires sent everybody to the clubhouse after the inning with the score tied at 3.
Saltalamacchia hit an RBI double for Boston to tie it at 1-1 in the second, then Ellsbury hit an RBI triple in the third and scored on Victorino's sacrifice fly to put Boston up 3-1.
Markakis led off the fourth with a homer to Boston's bullpen, and the Orioles tacked on another run on an error by right fielder Jackie Bradley Jr. to tie it.
NOTES: Jones singled to center in the fourth, giving him at least one hit in all eight of Baltimore's games this season. ... Markakis' homer to lead off the fourth gave him at least one hit in seven of eight games. ... The Orioles entered the game at 3-4, their first losing record since ending the 2011 season 69-93. ... Boston's Stephen Drew was activated from the disabled list Wednesday after missing the start of the season with a concussion. He started at shortstop. ... To make room for Drew on the roster, the Red Sox optioned SS Jose Iglesias to Triple-A Pawtucket. ... The Red Sox also placed RHP John Lackey on the 15-day DL with a strained right biceps. Lackey missed last season while recovering from Tommy John surgery on his right elbow. ... The Red Sox' streak of 820 consecutive sellouts is now the longest in Major League history. ... The Red Sox held a moment of silence before the game in memory of longtime Boston AP sports writer Dave O'Hara, who died Wednesday at age 86. ... The series concludes Thursday when Baltimore's Chris Tilman (0-0) faces Alfredo Aceves (0-0)in a battle of right-handers both seeking their first win of the season.