BALTIMORE - It might've been strongman Chris Davis' softest hit of the season, but it couldn't have come at a better time for the Orioles.
The major league leader in home runs, Davis blooped an opposite-field single to short left field to drive in the game-winning run with two out in the bottom of the 13th, giving Baltimore a 5-4 win over the Red Sox and mercifully ending the Orioles' longest game of the season.
Played before 20,098 at Camden Yards, the game ended four hours, 35 minutes after it began.
Davis got the obligatory shaving cream pie in the face after the game, but the Baltimore bullpen deserved a lot of the credit. Only one Boston batter reached base over the final six innings, and that was on catcher's interference.
T.J. McFarland, the seventh Orioles pitcher, tossed a scoreless 13th and picked up his first major league win in the bottom of the inning on Davis' bloop hit off loser Alex Wilson (1-1). Davis had two RBIs in the game, increasing his season total to 56, second in the AL, but he also struck out three times before coming through against Wilson.
Wilson got the first two Orioles out in the 13th, but walked Nick Markakis. Adam Jones followed with a single to right, setting up Davis' heroics. It was one of the only clutch hits of the night for the Orioles, who left 16 runners on base.
Orioles pitching, meanwhile, didn't allow a single walk.
It looked like the continuation of a trend for what has been the major leagues' worst bullpen over the past month when Orioles' reliever Brian Matusz gave up a pair of runs in the seventh inning to blow what could have been rookie Kevin Gausman's first big-league win.
Gausman pitched 5 1-3 innings, giving up six hits and one run while striking out five and walking none in his fifth start for the Orioles. But after Matusz gave up two runs in the seventh, Tommy Hunter, Darren O'Day, Troy Patton, Jim Johnson and McFarland were as close to perfect as they could be.
The Orioles' (38-29) win combined with the New York Yankees' 18-inning loss on Thursday allowed Baltimore to move into second place in the AL East, 2 1/2 games behind Boston.
Danny Valencia led off the third with a no-doubt-about-it home run to left field, his fourth of the season, to open the scoring.
Ryan Flaherty followed with a double down the left-field line, was bunted to third and scored on Manny Machado's broken-bat single up the middle through a drawn-in infield. Machado later scored on a Davis single.
The three-run lead didn't last long, however, as David Ortiz and Mike Carp hit back-to-back solo homers to right-center. That continued a troubling trend for Gausman, who entered Thursday's game having allowed five home runs in just 19 2-3 innings over his first four major league starts.
Prior to giving up the longballs, however, Gausman was cruising. He faced just one batter over the minimum over the first 3 2-3 innings.
He was aided by a line drive double play in the first inning after yielding a one-out hit, gaveup a double but struck out the side in the second, and enjoyed a 1-2-3 third. He had retired seven in a row before Ortiz blasted his 14th home run of the season followed by Carp's seventh.
Gausman tossed a scoreless fifth despite a windblown pop fly by Will Middlebrooks that dropped in for a double. He retired Shane Victorino on a deep flyball and then left the game in the hands of the bullpen after yielding a Dustin Pedroia single.
The Orioles padded their lead in the bottom of the fifth when Markakis reached on an error and scored on Matt Wieters' two-out single to left. The Orioles left the bases loaded when Valencia popped up off reliever Franklin Morales to end the inning. The stranded nine runners in the first six innings and that failure to cash in a few more caught up with them when Boston tied it in the top of the seventh against Matusz.
Daniel Nava, Jared Saltalamacchia and Middlebrooks opened the inning with singles to load the bases, Middlebrooks working all the way back from a no-ball, two-strike count. Stephen Drew followed with a sacrifice fly that Adam Jones tracked down just in front of the wall in center.
Matusz then got Jacoby Ellsbury to hit a grounder right to second baseman Ryan Flaherty, who pitched to shortstop J.J. Hardy on second base for the force. The speedy Ellsbury beat Hardy's throw to first, however, to stay out of the double play, allowing Saltalamacchia to score the tying run.
While Matusz struggled, the rest of the Baltimore bullpen sparkled. Hunter pitched 2 1-3 perfect innings. O'Day followed with 1 1-3 scoreless frames. Ellsbury reached on catcher's interference and stole second with two out in the 10th, but O'Day struck out Victorino to end the threat.
The Boston bullpen was just as good until the 13th. After the Orioles chased starter Felix Doubront in the fifth, Red Sox relievers kept Baltimore off the board for the next six innings, allowing only two hits. The Orioles had a few scoring opportunities after the fifth, but failed to capitalize.