The Rays had gone 19 straight games against the Tigers without scoring more than four runs, a streak that went back more than three years. Tampa Bay had seven extra-base hits Friday, including a two-run triple by Sean Rodriguez in the sixth.

Alex Cobb (4-6) allowed three runs and five hits in five-plus innings for the Rays, and their bullpen allowed only one baserunner. Brad Boxberger pitched two perfect innings of relief, Joel Peralta worked the eighth, and Jake McGee finished for his fourth save.

There were three hit batsmen, and umpires warned both benches in the sixth. After the warnings, Rays manager Joe Maddon argued and was ejected.

Desmond Jennings doubled twice and scored three runs for the Rays. Tampa Bay rebounded after an 8-1 loss Thursday to start this four-game series, and the last-place Rays have now won six of seven.

Detroit’s AL Central lead over Kansas City fell to four games. Tigers designated hitter Victor Martinez left in the eighth because of back irritation.

Jennings and Zobrist hit back-to-back doubles in the third to give Tampa Bay a 1-0 lead, and Longoria led off the fourth with his 11th homer of the year. An RBI groundout by Torii Hunter in the bottom of the fourth made it 2-1.

Zobrist hit an RBI double in the fifth, and Rodriguez’s triple the following inning brought two more runs in.

Cobb hit Ian Kinsler to lead off the bottom of the sixth — with Miguel Cabrera on deck. Longoria and Martinez had been hit earlier in the game, so plate umpire Quinn Wolcott warned both benches.

Maddon took a few steps out of the dugout, and second base umpire Greg Gibson seemed to motion to him to stay back. Maddon continued arguing from a distance, and after being tossed, Maddon approached Gibson and kept arguing before finally leaving.

It was Maddon’s third ejection of the year and 35th of his career.

Cobb didn’t get another out. Cabrera walked and Martinez hit an RBI single. After J.D. Martinez walked to load the bases, Boxberger came on and got Hunter to bounce into a double play that brought another run home.

Don Kelly struck out to end the inning, and Boxberger struck out two more in the seventh.

Jennings doubled and scored in the seventh to make it 6-3.

NOTES: Peralta made his 267th appearance for the Rays, the most for the franchise by a pitcher. Esteban Yan had 266. ... Austin Jackson struck out four times for Detroit and Eugenio Suarez fanned three times. ... The Rays put LHP Cesar Ramos on the paternity list and recalled LHP Jeff Beliveau from Triple-A Durham. ... Detroit RHP Anibal Sanchez (5-2) faces Tampa Bay RHP Chris Archer (4-5) on Saturday.