BALTIMORE -- The last time the Orioles and Red Sox played a game close to this long, infielder Chris Davis was the center of attention, going down as the winning pitcher in an epic 17-inning showdown last May. On Thursday, baseball's home run leader didn't need to showcase his arm or his thunderous power.
All it took was a two-out bloop single, a perfectly placed hit that dropped in between shortstop and left field, to give Davis another face full of shaving cream after the Orioles' 5-4, series-opening victory in 13 innings.
"I thought about it," Davis said of potentially getting the call to jog out to the bullpen again. "Once it gets late in extra innings, you start going through all the scenarios: Who we have on the bench? Who's DHing? Who would play first if I had to go in? But hopefully that's something I'll never have to do again, and I can just kind of ride off into the sunset."
Davis' walk-off hit, in front of a crowd of 20,098 at Camden Yards, moved Baltimore (38-29) ahead of the New York Yankees -- who lost on a walk-off single in 18 innings in Oakland -- and ensured a happy ending to the club's longest game this year.
"Sometimes that's what it takes," center fielder Adam Jones said of the 13th inning, which consisted of a walk, his single and Davis' game-winning hit. "We left 13 guys on base [through nine innings]. Sixteen at the end. So we had some opportunities, we just didn't cash in. But that's why we keep grinding. We never gave up."
The Orioles, who have now won 12 of their last 16 games against a first-place Red Sox team, started to mount the rally when Nick Markakis, who flied out to the warning track in his first at-bat against reliever Alex Wilson, worked a two-out walk against the Boston righty. Jones followed with a right-field single before Davis' hit emptied the home dugout, giving Baltimore its third win in four games against Boston this season.
"It's a team that our guys really respect," manager Buck Showalter said of a Boston club that has lost 22 of its last 31 games to the Orioles. "It's a team, this year, that really plays the game right. … The things that they do, it's more than just payroll. They have good people. You can tell they put some good people in place and they're going to be a force all year.
"They've got a lot of weapons. A lot of weapons. They're very solid. You'd be picky to find a dent in their armor. We were fortunate tonight. We were fortunate to find a hole there."
While Davis -- who joked he needed to get his velocity up before he could pitch again -- was the hero, the Orioles' relief corps turned in a fabulous effort leading up to it. After lefty Brian Matusz -- who stranded a runner of starter Kevin Gausman's in the sixth -- allowed Boston to tie things up by surrendering two runs in the next inning, the bullpen turned in 6 1/3 scoreless innings.
Matusz was replaced in the seventh by right-hander Tommy Hunter, who kept the score tied at 4, with the help of catcher Matt Wieters ,who threw out Ellsbury on a steal attempt. Hunter turned in 2 1/3 scoreless innings, and his dominance was the first of several impressive innings from the O's, who swapped zeoes with a Boston bullpen that picked up eight innings following starter Felix Doubront.
"The zeros were awesome, but I think the most impressive part was no walks in 13 innings," Jones said. "That's the highest walking team in baseball. I don't want to jinx us, but we just went after them. We went after everybody."
Hunter was followed by Darren O'Day, who pitched around a two-out catcher's interference call that allowed Ellsbury to reach in the 11th. Lefty Troy Patton replaced O'Day to record the final two outs of the inning, and Jim Johnson turned in a 1-2-3 12th before Rule 5 Draft pick T.J. McFarland threw a scoreless 13th to pick up his first win this season.
"You should have seen the clubhouse," Showalter said of the team's reaction to McFarland's first "W". "He'll remember that postgame. We'll leave it at that."
The Orioles jumped on Doubront for a three-run third inning and were able to chase the lefty after 4 2/3 innings.
Designated hitter Danny Valencia got things going in the third, sending a 1-0 pitch into the left-field seats for his fourth homer of the year, eclipsing last year's total in 44 games in just his 13th game with the Orioles. Ryan Flaherty followed with a bloop double over third base and, after advancing to third on Nate McLouth's sacrifice bunt, Manny Machado extended the O's lead to two with a broken-bat single into center field. Davis pushed it to three, poking a ball into the second-base hole to score Machado.
The Orioles added to that in the fifth, scoring another run on Wieters' two-out RBI and loading the bases to chase Doubront from the game. But they were stopped cold after that, as a Boston bullpen that entered the day with a 2.41 road ERA pitched out of several sticky situations. Baltimore -- which had three hit batsmen -- had first and second with one out in the sixth and had a runner on every inning after that, but were unable to capitalize until Davis' RBI.
"That's the beautiful thing about home-field advantage," Markakis said. "You get the last shot. It always seems like once you get to the ninth inning, it's hard to come by hits. We battled in there. Our bullpen did a good job and allowed us to get up there and win the ballgame, and that's what we did."
Largely lost in the game was Gausman, who turned in 5 1/3 solid frames in his fifth Major League start and was optioned after the game to Triple-A Norfolk. The 22-year-old Gausman struck out five and surrendered six hits, allowing a pair of runs on back-to-back homers in the fourth inning. Designated hitter David Ortiz sent a 1-1 pitch into the seats and Mike Carp -- an in-game replacement for a sick Mike Napoli -- followed, blasting Gausman's changeup over the right-center-field wall.
Brittany Ghiroli is a reporter for MLB.com. Read her blog, Britt's Bird Watch, and follow her on Twitter @britt_ghiroli. This story was not subject to the approval of Major League Baseball or its clubs.