DETROIT (AP) -- Miguel Cabrera's two-run homer with one out in the ninth inning gave the Detroit Tigers a 5-3 victory over the Tampa Bay Rays on Thursday night.
The game was tied at three entering the ninth, but Alex Avila singled off Tommy Hunter (0-2) with one out. Andrew Romine pinch ran and trotted home when Cabrera hit his seventh career game-ending homer into the right-field stands.
Justin Wilson (3-2) picked up the win with a scoreless inning of relief.
Tigers starter Justin Verlander pitched seven innings, allowing two runs on six hits and five walks. He's now walked five batters three times this season after not doing it a single time in 2016. He struck out six.
Alex Cobb gave up three runs on eight hits and two walks in 6 2/3 innings, striking out three.
Victor Martinez gave the Tigers a 1-0 lead with his first RBI of June, a single that snapped a 0-for-16 slump.
Daniel Robertson tied it in the second with a run-scoring groundout, and Logan Morrison put the Rays ahead with a two-out double in the third.
J.D. Martinez's double made it 2-2 in the bottom of the third, but Cobb and Verlander both settled down at that point.
Ian Kinsler led off the seventh with a single and took second on Avila's walk. However, Cobb got Cabrera to bounce into a 5-4-3 double play on his 116th and final pitch.
Jumbo Diaz came out of the bullpen and got Victor Martinez to hit a routine grounder to short, but it went under Robertson's glove, allowing Avila to score the go-ahead run.
Francisco Rodriguez pitched the eighth for Detroit, and allowed a long tying homer to Steven Souza Jr.
TRAINER'S ROOM
Rays: C Wilson Ramos (ACL) went 1 for 3 in a seven-inning catching stint while on rehab at Triple-A Durham. RHP Brad Boxberger (flexor strain) struck out the side in the seventh inning while making his first rehab outing.
Tigers: Top relief prospect Joe Jimenez (back) was activated from the disabled list Thursday and pitched a scoreless inning for High-A Lakeland. Jimenez, who made his major league debut in April, is expected to return to Triple-A Toledo after another outing in Lakeland.
UP NEXT
Rays: RHP Erasmo Ramirez (3-1, 4.20) will pitch for Tampa Bay in the second game of a four-game series. Ramirez is 1-1 with a 6.59 ERA in six career appearances, including two starts, against Detroit.
Tigers: LHP Daniel Norris is scheduled to start for Detroit on Friday. Norris (3-4, 4.41) is 2-6 with a 4.52 ERA in 14 career starts at Comerica Park.