BOSTON -- The Baltimore Orioles ended a successful road trip with a wasted opportunity to climb into a tie for the AL East lead.
When Ryan Flaherty struck out with the bases loaded in the ninth inning Sunday, the Red Sox had a 2-1 win and the Orioles headed home after going 6-3 on the journey to Oakland, Seattle and Boston.
"We needed this one. Obviously, going down to this last stretch every game is looked at as a must win," Adam Jones said. "We had a good road trip. We really, really wanted this one to finish off the road trip, but it happens."
The Orioles remained one game behind the New York Yankees and lead Oakland by one game for the top wild-card spot in the league. The Athletics beat the Yankees 5-4.
The Red Sox snapped a four-game losing streak -- and ended the Orioles six-game winning streak -- but are trying to finish out of the division cellar with their first losing record since 1997.
"Coming to Boston, take two out of three, I don't care what kind of team we're playing or how we're playing," Baltimore's Mark Reynolds said. "It's always big and we keep wining series and we'll see where we're at here in a week or two."
The Orioles almost completed a three-game sweep after Cody Ross doubled in the go-ahead run in the eighth. They loaded the bases with one out against Andrew Bailey on a single by Reynolds, a ground-rule double by pinch-hitter Jim Thome and an intentional walk to Chris Davis. But Boston's closer got Manny Machado to ground into a forceout at home, then struck out Ryan Flaherty to nail down his sixth save in eight opportunities.
"I like to work fast, but sometimes I work too quickly and get ahead of myself," Bailey said. "Today I was able to slow myself down and make the pitches when I needed to."
The decisive run came in when Dustin Pedroia led off the eighth with a double against Luis Ayala (5-5) and Ross followed with his tiebreaking hit.
In the first inning, Ross reached over the short right field wall near Pesky's Pole in the corner to take a home run away from Jones.
"I didn't really know where I was, actually. I thought that the ball was in front of the pole after I had caught it," Ross said. "I ran in and somebody was like 'You just robbed a home run.' I was like 'I did? All right. Cool."'
Junichi Tazawa (1-1) pitched a perfect eighth before the Orioles rally fell short.
Baltimore dropped to 27-9 in one-run games.
Boston starter Felix Doubront struck out 11 in seven innings, including three each against Robert Andino and Reynolds. Andino returned after being hit in the helmet with a pitch on Friday night.
With the pitcher's mound in the sun and home plate in shadow until later in the game, hitters had a tough time picking up pitches, especially from a lefty.
"It was tough. Guys were trying sunglasses, no sunglasses, light lens, dark lens," Reynolds said. "Both teams were playing in the same conditions. It's probably why the score was 2-1."
Baltimore manager Buck Showalter thought plate umpire Al Porter's vision might not have been perfect either. He said Matt Wieters, who led off the ninth by grounding out, should have walked had Porter not called a pitch a strike.
"Wieters really walked and we would have scored a run," Showalter said, "but, unfortunately, we weren't the only ones having trouble seeing the baseball, it looks like."
After Ross drove in the go-ahead run, Brian Matusz retired Mauro Gomez on a fly ball before highly touted prospect Dylan Bundy made his major league debut with one out and retired both batters he faced on fly balls. Chosen fourth in last year' draft, the 19-year-old right-hander was 9-3 with a 2.08 ERA in the minors this year before being called up from Double-A Bowie on Wednesday.
"I was nervous at first," Bundy said. "I was hoping to get an inning, but getting those first two outs, that inspires me a little bit and, hopefully, the next time I won't be as nervous."
Doubront allowed one run on four hits with two walks in his second straight solid start after losing his previous five decisions.
The Red Sox scored the first run in the fourth when Ross led off with a single and took second on a walk to James Loney. With one out, Danny Valencia grounded to shortstop J.J. Hardy, who threw to second for the first out, but Andino's relay into the dirt eluded Reynolds at first base. Ross scored from second, sliding ahead of the attempted tag by Wieters.
Doubront held the Orioles hitless through four innings and gave up hits to the first three batters in the fifth. Lew Ford singled, took third on a double by Davis and scored on a single by Machado.
NOTES: The Red Sox held a postgame ceremony for Johnny Pesky, who died Aug. 13 at the age of 93 after a baseball career of more than 60 years. He played, managed and served as a broadcaster for the team. ... The Red Sox recalled OF Che-Hsuan Lin from Triple-A Pawtucket. ... John Lackey, on the disabled list all year following Tommy John elbow surgery, pitched two innings in a Red Sox intrasquad game in Fort Myers, Fla. He threw 26 pitches with three strikeouts, no hits and no walks. ... The Orioles return home to open a four-game series Monday with a doubleheader against the Toronto Blue Jays. Steve Johnson (3-0) pitches for Baltimore against Henderson Alvarez (9-13) in the opener and Wei-Yin Chen (12-9) goes for the Orioles against Rickey Romero (8-14) in the nightcap. ... The Red Sox have a day off before opening their final home series of the season with the first of two games against the Tampa Bay Rays. Clay Buchholz (11-6) is scheduled to pitch for Boston against David Price (18-5).