DETROIT -- ��� Chris Davis homered in the 12th inning and again in the 13th.
After the second one, the Baltimore Orioles finally held on.
Davis' two-run shot in the 13th put the Orioles ahead to stay, and they snapped a four-game losing streak by outlasting the Detroit Tigers 13-11 on Tuesday night. Davis had led off the 12th with a home run that started a three-run inning for Baltimore, but the Tigers rallied with three of their own in the bottom half to keep the game going.
"That was a lot of fun at the end, but that's a taxing night, especially at the beginning of a series," Davis said. "You don't enjoy one like that unless you win it."
The Orioles led 7-1 after scoring seven runs in the third, but they squandered that big advantage and needed Mark Trumbo's solo shot with two outs in the ninth just to force extra innings. Davis came up with a runner on third in the 13th and hit a drive to right off Francisco Rodriguez (1-5).
Richard Bleier (1-1) earned his first career win, pitching the final 1 2/3 innings for the Orioles.
"I'm pretty excited. With our bullpen, I didn't think the game would get to me, but things just didn't work out," Bleier said. "Everyone is going to have an off night, and we had that happen to a couple guys today, so I'm just glad I could get in there and do my job."
J.D. Martinez homered twice for the Tigers, including a grand slam that put them up 8-7 in the seventh. Victor Martinez also went deep for Detroit, which was one out from a remarkable victory when Trumbo connected off Justin Wilson.
The Tigers had the bases loaded with two outs in the 11th and 12th, but with the winning run 90 feet away, Tyler Collins lined out to right in the 11th and grounded out to second in the 12th. Collins is mired in an 0-for-30 slump, and Detroit didn't have any position players left to pinch hit.
"I don't have any mixed feelings about that game," Orioles manager Buck Showalter said. "We had several chances where we could have let it get away and we never did. That's a great win."
After Davis put the Orioles up 9-8 in the 12th, they added two more runs and appeared to have a pretty safe lead, but the Tigers tied it with RBI singles by Ian Kinsler, Miguel Cabrera and Alex Avila.
"We did a good job of coming back," Avila said. "A lot of times, when you're down 7-1, it can be tough, but guys continued to put good at-bats together."
Detroit led 1-0 in the third when J.J. Hardy started Baltimore's barrage with a solo homer. Manny Machado and Davis hit RBI doubles, and Welington Castillo added a two-run single to make it 5-1. The Orioles sent 11 batters to the plate in the inning.
Victor Martinez hit a two-run homer in the bottom of the third, and J.D. Martinez added a solo shot that same inning.
J.D. Martinez drew four of Detroit's nine walks. Two of them were intentional, setting up the at-bats by Collins with the bases loaded.
Both teams used six relievers in a game that lasted 5 hours, 19 minutes. The Orioles didn't have any relievers left after Bleier, but Showalter said he could have used right-hander Ubaldo Jimenez if need be. Jimenez is set to start Wednesday night.
ANSWERING THE BELL
Long before the game finally ended, left-hander Chad Bell pitched four scoreless innings for Detroit in relief of Boyd, helping the Tigers get back in it.
"The first inning he pitched, it looked like his command was a little off, but then he settled in," Detroit manager Brad Ausmus said. "He threw a harder slider today."
Trumbo had four hits, and the middle of the Baltimore order -- Adam Jones, Machado, Trumbo and Davis -- went 13 for 26 with eight runs and seven RBI.
Orioles: Castillo was out with right shoulder tendinitis and had not played since April 30. He was activated from the disabled list before the game and had three hits.
Orioles: Baltimore sends Jimenez (1-1) to the mound Wednesday night against the Tigers. Showalter said Dylan Bundy would have been able to start Wednesday on regular rest if Jimenez had been needed Tuesday.
More AP baseball: https://apnews.com/tag/MLBbaseball
Follow Noah Trister at www.Twitter.com/noahtrister