ST. PETERSBURG, Fla. -- The Detroit Tigers dug themselves out of an early hole for a satisfying victory.
Pinch-hitter Marcus Thames came through with a tiebreaking single during a two-run eighth inning and Alex Avila had a two-run homer to lead the streaking Tigers past the Tampa Bay Rays 8-6 on Saturday night.
Detroit, which overcame a three-run deficit, went ahead 8-6 when Thames hit a bases-loaded single and Adam Everett drove in a run with a sacrifice bunt. The AL Central leaders, who also got a homer from Placido Polanco, have won five in a row.
"That's how you win games in the playoffs," Avila said. "When you get everybody contributing, you can't ask for anything better than that."
Detroit's bullpen was stellar, with six relievers holding the defending AL champions to four hits over 6 2/3 scoreless innings.
"The bullpen kept the wind in our sails," Tigers manager Jim Leyland. "The bullpen gave us confidence."
Detroit used 23 players overall.
"I'm drained," Leyland said.
Evan Longoria hit his 27th homer -- matching the total from his AL Rookie of the Year season in 2008 -- for the Rays, who have lost seven of 10. Tampa Bay remained six games behind Boston for the wild card.
"That's been too much of the script, that we've been able to play well and then we've given up some stuff late," Tampa Bay manager Joe Maddon said. "We've had a little bit of a hiccup."
Avila hit a two-run shot and Polanco added an RBI single in the seventh to tie it 6-all.
Longoria had a three-run homer during a four-run first off Armando Galarraga as the Rays took a 4-1 lead.
Carlos Pena became the first Tampa Bay player to have 100 RBIs or more in three seasons with a run-scoring single in a two-run third that made it 6-3. Pena has 23 RBIs over his last 15 games.
Polanco hit a first-inning solo homer before Carlos Guillen pulled Detroit to 4-3 on a two-run triple in the third.
Galarraga, recalled from Triple-A Toledo earlier in the day to pitch in place of injured Jarrod Washburn, allowed six runs, four hits and three walks in 2 1/3 innings. Washburn, slowed by a sore left knee, is scheduled to start Thursday at Kansas City.
Leyland expressed concerns about Galarraga's arm slot and planned to talk with pitching coach Rick Knapp about it.
Tigers right-hander Jeremy Bonderman (blood clot), who last pitched in the majors on June 8, gave up one hit, one walk and had two strikeouts in 1 2/3 scoreless innings.
"It just feels good to get out there," Bonderman said. "It's good to be part of it. Get in there and pitch in a little bit and do whatever I can to help these guys get to the playoffs."
James Shields allowed six runs and eight hits over 6 1/3 innings. The Rays' opening-day starter is winless -- including five losses -- over his last 10 starts at home, dating to June 4.
With a postgame concert featuring The Beach Boys, the announced crowd was a sellout of 36,973. In comparison, the Rays' three-game series Tuesday through Thursday against Boston averaged 19,221.
Leyland visited close friend and Rays senior adviser Don Zimmer, who is recovering after successful surgery for decompression of a nerve in his lower back on Wednesday. Zimmer could be released from the hospital in the next few days. ... Rays CF B.J. Upton (sprained left ankle) might start one game of Monday's doubleheader at the New York Yankees. ... Tigers closer Fernando Rodney, who allowed two runs and threw 35 pitches in the ninth inning of Friday's 4-3 win over the Rays, was rested and might get Sunday off, too. ... Detroit LHP Dontrelle Willis (anxiety disorder) allowed two runs and six hits in 6 1/3 innings for Toledo against Columbus.