A throwing error by Jose Iglesias allowed two runs to score in the ninth inning as Tampa Bay rallied to beat Detroit 8-7 on Wednesday night.

The Tigers shortstop stumbled while trying to turn what would have been a game-ending double play, instead his error cost Detroit the victory.

Kevin Kiermaier opened the ninth with a walk. He advanced to third on Evan Longoria's double. Francisco Rodriguez (1-1) intentionally walked Brad Miller to load the bases. One out later, the closer got Logan Morrison to ground to second base and Iglesias couldn't complete the double play, as he stumbled making the turn. He was hurt on the play and was on the field for a few minutes before walking off under his own power.

Austin Pruitt (1-0) got his first major league win in relief.

Kiermaier had three hits and four runs while Longoria had three hits and three RBIs.

Nick Castellanos hit two triples and the Tigers came back from an early four-run deficit. Castellanos became the first Tiger to hit two triples in a game since Austin Jackson on Aug. 5, 2012 against Cleveland.

Miguel Cabrera had three hits and drove in two runs for the Tigers.

Jordan Zimmerman gave up 10 hits and a walk to the first 21 batters he faced, but retired the final seven Rays he faced.

Singles by Longoria and Steven Souza Jr. drove in runs for the Rays in the first inning off Zimmermann. Longoria added a two-run single in a three-run fourth that put the Rays up 5-1.

Cabrera's two-out single in the third drove in Detroit's first run off Chris Archer, who gave up four runs on seven hits while striking out nine in five innings. Cabrera drove in another run off Archer with a double in the third, and Castellanos' second triple emptied the bases in the sixth after the Tampa Bay bullpen had issued four walks and a hit batsman.

Castellanos' first triple was hit off the top of the right-field wall in the first inning.

The Tigers failed to homer for the first time this season. They had homered in each of their first 13 games, setting a franchise record but falling a game short of the 2002 Cleveland Indians, whose 14-game season-opening streak was the longest in the last 100 years.

Zimmerman, pitching in his 200th major league game and his 199th start, gave up five runs on 10 hits in six innings, striking out four.

TRAINER'S ROOM

Tigers: OF Justin Upton (bruised right wrist) was out of the lineup and is doubtful for Thursday's series finale. Manager Brad Ausmus said it's ``realistic'' Upton could play Friday.

Rays: RHP Jake Odorizzi (strained left hamstring) threw at 60 feet on level ground.

MENDING MARTINEZ

Tigers OF J.D. Martinez (right foot sprain) is set to start on-field running Friday. Martinez has been running on a treadmill at the Tigers' complex in Lakeland, Florida. ``The doctors and everybody are pretty optimistic about it,'' Martinez said. ``I'm able to hit, able to throw. The running, we're building our way up there.''

UP NEXT

Tigers: LHP Daniel Norris (1-0) faces the Rays in Thursday's series finale. He is coming off six scoreless innings Friday night in a 7-6 win over Cleveland.

Rays: RHP Erasmo Ramirez (1-0) makes his first start of the season, filling in for Odorizzi. Ramirez started 27 games for the Rays in 2015, only one last season.