BOSTON -- Koji Uehara had been perfect for weeks and impenetrable for months, but the Red Sox's closer finally had an off-night on Tuesday, and it happened to come with the game on the line in a 3-2 loss to the Orioles at Fenway Park.
When Uehara entered in the top of the ninth, the game was tied at 2. The right-hander had retired 37 straight batters dating back to Aug. 17 and hadn't allowed a run since June 30.
The first streak ended when Danny Valencia led off the ninth with a triple that ticked off the glove of center fielder Shane Victorino.
The second would end when Matt Wieters followed with a sacrifice fly to right and the Orioles had their first lead of the night.
"I'm not disappointed that the streak ended," said Uehara. "Of course, I'm disappointed that we lost, but the streak wasn't a disappointment."
Victorino, a three-time Gold Glove Award winner, was disappointed in the sense that he felt he could have caught the drive by Valencia.
"Every ball is catchable," Victorino said. "You know what I mean? That's how I look at it. It eats at me that I came that close and I didn't catch it. That makes me more upset. I go that far and I don't catch it. That's the part that eats at me. Every ball that's hit, I look at it as I should catch it."
The Red Sox did reduce their magic number for clinching the American League East to three, thanks to the Rays losing to the Rangers.
Boston could clinch a postseason berth Wednesday with a win against the Baltimore and a loss by the Indians in Kansas City. The earliest the Sox can clinch the division is Thursday.
The victory was crucial for the Orioles, as they are two games back in the fight for an AL Wild Card berth.
"I don't even know who won or lost tonight," said O's manager Buck Showalter. "I can't [worry about that]. It doesn't matter. We have to take care of business. It doesn't matter if you don't."
The Orioles were in prime position to take the lead in the top of the eighth when Nate McLouth led off with a single and Manny Machado followed with a double against Brandon Workman.
With the dangerous Chris Davis looming, manager John Farrell called on lefty Craig Breslow. All Breslow did was induce Davis and Adam Jones into harmless groundouts to short before retiring Nick Markakis on an inning-ending flyout to left.
"I put him in a bad spot and he pitched exceptionally in that role," said Farrell. "In hindsight, he probably should have started the eighth rather than put him in a situation where he's coming in with a couple of men on."
Red Sox right-hander Ryan Dempster turned in a solid start, giving up three hits and two runs over six innings. He walked four and struck out five, throwing 100 pitches.
"I felt like I threw the ball decent," said Dempster. "It was a tough one. We were right there, we had a chance and some guys did some really great things tonight."
In the top of the sixth, Davis belted home run No. 51 on the season against Dempster, a towering shot to center that tied the game at 2. That set an Orioles record, surpassing Brady Anderson, who clubbed 50 in 1996.
"I'm excited," said Davis. "I've said it all along. When you're hitting home runs and your team isn't winning, it feels like it's for nothing. I was obviously glad to tie the game there, and for us to hang in there and get a run off Koji -- that's something we've struggled to do in the past. So I'm proud of the way everybody played."
Dustin Pedroia got the Boston bats off to a quick start when he led off the bottom of the first with a homer over the Green Monster. It was his first home run since July 31, covering a span of 176 at-bats.
Thanks to some sloppy defense by the Orioles, the Red Sox extended their lead to 2-0 in the fourth. With one out, Jarrod Saltalamacchia reached on a throwing error by Machado at third and Stephen Drew walked.
Saltalamacchia and Drew then executed a double steal. That set up Xander Bogaerts for a liner to left that McLouth dropped. It was ruled a sacrifice fly and an error, as Saltalamacchia scored.
The Orioles had their first threat against Dempster in the fifth. Valencia led off with a walk. After a dazzling stop by Pedroia on a lineout by Wieters, J.J. Hardy belted a double to left, putting runners on second and third with one out. A fielder's-choice grounder by Brian Roberts made it a 2-1 game.
Ultimately, the game came down to the ninth inning. And for one of precious few times this season, Uehara did not come through.
"To see what he'd done, it was amazing," Victorino said. "It was great. It [stinks] that I had a play that I was involved in that ends that streak. But hey, we pick up and go. Since he's taken that role, he's done a great job. Things like that just don't happen. It's impressive."