ST. PETERSBURG (620 WDAE) -- The Tampa Bay Rays couldn't hold a 5-1 lead Wednesday, but rallied for a pair of runs in the bottom of the ninth inning to walk off with an 8-7 victory over the Detroit Tigers Wednesday at Tropicana Field.

Trailing 7-6 going into the final frame, Kevin Kiermaier derw a leadoff walk from Tigers closer Francisco Rodriguez, and moved to third on an opposite-field double by Evan Longoria.  Brad Miller was intntionally walked to load the bases, and after Steven Souza Jr. struck out on a controversial 3-2 count, one that got manager Kevin Cash ejected, Logan Morrison grounded into what could have been a game-ending double play.  However, shortstop Jose Iglesias tripped over the second base bag and his throw got past Miguel Cabrera, allowing Kiermaier and pinch-runner Peter Bourjos to score and end the game.

Tampa Bay broke out to a 2-0 lead in the bottom of the first inning, as Corey Dickerson's fly ball landed between JaCoby Jones and Tyler Collins for a double.  Kiermaier's bunt single then moved him to third and Longoria's infield single got the Rays on the board.

Souza followed with an RBI single to make the lead two runs.

Cabrera cut the lead in the in the top of the third with an RBI single, but the Rays responded in the fourth with a run-scoring single by Dickerson and two more RBI off the bay of Longoria with a single.

Detroit rallied in the fifth, as Archer allowed another RBI to Cabrera, this time on a single after appearing to have struck him out earlier in the at-bat, and Victor Martinez followed with a two-run single on a flare that left-fielder Shane Peterson could squeeze in his glove.

Archer left after five innings and the the bullpen had troubles in the sixth, as Danny Farquhar allowed a walk and hit a batter, but almost wiggled off the hook thank to a terrific 5-6-4 double play turned on a popped up bunt by Jones.

But Jumbo Diaz walked Iglesias and Ian Kinsler to load the bases in front of Nick Castellanos, who lined an offering past a diving Kiermaier in center for a bases-clearing triple to make a 7-5 deficit.

Austin Pruitt then struck out Martinez with runners at the corners to stop the bleeding, and would allow just one hit over the final 3 1/3 innings to earn his first major league win.

Tampa Bay has now won all three series at home this season, and can go for the sweep Thursday afternoon, when Erasmo Ramirez (1-0, 3.72 ERA) gets his first start filling in for the injured Jake Odorizzi, taking on Daniel Norris (1-0, 2.19 ERA).  First pitch is scheduled for 1:10, with pregame coverage on WDAE starting at noon with The Inside Pitch, presented by Sykes Lakeland.