ST. PETERSBURG — The Rays won Wednesday's game in wild and thrilling fashion, scoring the tying and deciding runs in the 8-7 victory as Tigers shortstop Jose Iglesias tripped going across second base in what should have been a game-ending double play and threw the ball away.That was after looking like the Rays were going to lose it in shocking fashion, with two-time Gold Glove centerfielder Kevin Kiermaier missing a line drive that allowed three runs to score."I know it would be a lot harder for me to sleep tonight if we didn't come out on top with a W,'' Kiermaier said. "We'll take 'em anyway we can.''Here's how they won: Kiermaier opened the ninth with a walk. Evan Longoria doubled for his third hit on the night he shaved his full beard. Brad Miller was intentionally walked to load the bases. Steven Souza Jr. struck out; manager Kevin Cash was ejected, arguing he checked his swing.That set up the confusing finish. Logan Morrison grounded to second, but Iglesias stumbled after taking the throw to force Miller, with whom he then collided jaw to knee. As the ball hit the ground and rolled away, Kiermaier and Peter Bourjos, pinch-running for Longoria, came around to score. TOPKIN'S TAKEAWAYS: Beat writer Marc Topkin's takeaways from Wednesday's Rays win over the Tigers "I'm about halfway there and he just falls right in front of me,'' Miller said. "I saw my knee going into him pretty good. And then the chaos ensued.''The Rays were celebrating, the Tigers protesting and the umpires huddling. After a few moments, the umps agreed the game was over, giving the 8-8 Rays their second walkoff win of the season."Interesting ball game, to say the least,'' Cash said.Here's how they nearly lost: Kiermaier flat-out missed catching a line drive he had well in his sights, allowing what should have been the last out of the sixth inning turn into a bases-clearing triple, and what had once been a 5-1 lead into a 7-6 deficit."The key point in that game was when I missed that ball. That was a big blow to us, and they had all the momentum," Kiermaier said. "It was doing something that really threw me off. I didn't plan on diving, but I went to dive and it didn't hit my glove. I don't know if that's ever happened. It was just a crazy play."I don't know how to explain it. I'll have to break it down, try to look at it in slow mo. I need to make that play nonetheless.''Sure, other Rays were complicit in the lead getting away. Chris Archer, for one, who lasted only five innings because he threw 104 pitches. New leftfielder Shane Peterson, who had Victor Martinez's blooper in and then out of his glove leading to two runs in the fifth. RAYS JOURNAL: Cagey Evan Longoria tricks the Tigers And certainly relievers Danny Farquhar and Jumbo Diaz, who between them — and around a savvy veteran move by third baseman Longoria in letting a bunt drop to turn a double play — allowed three walks and a hit batter. But, still, the Rays were hanging on to a 5-4 lead in the sixth at the time, though with Tigers on every base.The ball off the bat of Nick Castellanos rocketed toward right-center, but Kiermaier got a good break, was making a good run, left his feet — and missed it.That after a good but not great outing from Archer, who pitched himself out of the game by throwing 104 pitches to get through five innings while allowing the dangerous Detroit lineup four runs, though two on a blooper that dropped just in front of Peterson in left.Archer had a season-most nine strikeouts in what turned out to be his shortest outing, which wasn't a coincidence. "I felt like I had good stuff,'' Archer said. "There just are certain moments where I didn't execute as well as I could, but we won the game. That's the focus.''Rookie Austin Pruitt, off to a rough start, worked the final 3⅓ innings for his first victory.