ST. PETERSBURG, Fla. (AP) The Detroit Tigers found a way to win a wild, long game against Tampa Bay.
Victor Martinez drew a tiebreaking bases-loaded walk during a three-run 11th inning and the Tigers beat the Rays 8-6 on Tuesday night.
Ian Kinsler opened the 11th with a triple off Grant Balfour (1-5), a flare to right that got past a diving Kevin Kiermaier. Torii Hunter walked and Miguel Cabrera was intentionally walked before Martinez got his free pass.
''We did what we had to do,'' Hunter said. ''Had good at-bats and we came through with some runs.''
Hunter scored on Jeff Beliveau's wild pitch and Bryan Holaday added a sacrifice fly that gave Detroit an 8-5 lead.
Jim Johnson (5-2) worked out of a two-on, two-out jam in the 10th. Joe Nathan gave up Evan Longoria's RBI single in the 11th before getting his 26th save.
The Tigers, the AL second wild-card leader, won for the fifth time in 13 games.
The game took 4 hours, 42 minutes.
James Loney homered for the Rays, who had a club-record stretch of 13 consecutive games holding opponents to four runs or less end.
Detroit starter Max Scherzer came up short in his bid to become the AL's first 15th winner when Joba Chamberlain gave up an eighth-inning sacrifice fly to Vince Belnome that tied it at 5.
Scherzer allowed four runs and four hits over seven innings. The right-hander held Tampa Bay scoreless on one hit over his final five innings.
''Both Max and the offense picked it up as the game went on,'' Tigers manager Brad Ausmus said.
J.D. Martinez hit a solo homer that put the Tigers up 5-4 in the eighth. Rajai Davis had a sixth-inning game-tying RBI single off Chris Archer, who gave up four runs and five hits in 5 2/3 innings.
The Tigers pulled within 4-3 in the fifth, thanks in part to a video review. After Kinsler walked with the bases loaded and Hunter hit a run-scoring grounder, Cabrera was given an RBI single after a challenge by Ausmus. The call that center fielder Desmond Jennings had made a sliding catch on Cabrera's two-out liner was overturned.
Loney's homer put the Rays up 3-0 in the first.
Belnome doubled for his first big league hit and scored to make it 4-0 on Zobrist's second-inning single. Belnome had what would have been his first homer in the fourth changed to a foul after a video review.
''We got burned on replay twice but they were the right calls,'' Rays manager Joe Maddon said. ''Had replay not been part of the game, we would have won that game tonight.''
Scherzer had allowed three runs or less in each of his previous 10 starts.
Tigers: RHP Justin Verlander (sore right shoulder) could throw off a mound in a couple day and might start Saturday. OF Andy Dirks (back surgery) injured a hamstring at Triple-A Toledo and could miss the rest of the season.
Rays: OF Wil Myers (broken right wrist) is expected back this week. C Ryan Hanigan (oblique) and OF David DeJesus (broken left hand) are both nearing rehab assignments.
Tigers RHP Rick Porcello (13-7) and Rays RHP Jake Odorizzi (9-9) are Wednesday night's scheduled starters.