The win completed a three-game weekend sweep of the Tigers -- the Rays' eighth sweep of the season -- while extending the team's winning streak to five games and giving the Rays a record of 66-44 to match their 2007 season win total.
Trying to protect a 5-4 lead, Detroit reliever Fernando Rodney walked pinch-hitter Willy Aybar to start the Rays' 10th. Two scary moments followed.
The first came when Jason Bartlett tried to put down a sacrifice bunt, but took the pitch off his right index finger and had to leave the game.
Riggans then entered the game as a pinch-hitter and the first pitch he saw from Rodney came inside. When he tried to turn away, the ball plunked him right in the middle of his chest. Riggans immediately went to the ground and a host of Rays medical personnel raced out to help.
"I did not like that," Maddon said. "I got out there as quickly as I could because that's a bad spot to get hit. He lost his breath. ... I kept saying, 'There's no rushing this. Take your time. Make sure you're OK.'"
Riggans recovered enough to take his base and he even managed a little levity after the game.
"That wasn't the best way to get the runner over," Riggans said. "[The pitch] was firm."
Akinori Iwamaura sacrificed the runners into scoring position for B.J. Upton, who walked to bring up Carl Crawford. Crawford singled to left to score the tying run before Pena walked to force in Riggans with the winning run.
"The way we do it really doesn't matter," Pena said. "What a great game, again, today. The way we picked each other up."
Sunday's early innings saw a pitching matchup between Shields, who started for the Rays and allowed two runs in 6 1/3 innings, and Armando Galarraga, who allowed the Rays to score just one run in seven innings.
In the top of the eighth, Gary Sheffield drilled a 3-2 fastball from Grant Balfour into the left-field stands for his ninth home run of the season to give the Tigers a 3-1 lead. At this point, the outlook looked bleak for the Rays, but in hindsight, the game was just beginning.
Kyle Farnsworth came on in relief for the Tigers in the eighth to try and protect the Tigers' lead. But he found trouble immediately when Eric Hinske led off the inning with his 16th home run of the season, and one out later, Iwamura singled to center field to bring up Upton, who connected on a 3-1 pitch and deposited the offering over the center-field wall for his seventh home run of the season and what appeared to be a 4-3 Rays win.
It was a "3-1 count, definitely sitting dead red," Upton said.
The Rays' lead quickly vanished.
Troy Percival came on in the ninth to try and earn his 25th save of the season. Instead, he gave up a leadoff home run to Curtis Granderson, which tied the game at 4.
"The first pitch of the inning, I thought, 'Leadoff hitter, he's going to be taking,'" Percival said. "I grooved it, he hit it out. The odds of that aren't real good, but Granderson's a good hitter. ... He beat me on that one."
Miguel Cabrera then led off the 10th by hitting a 1-1 Percival offering off the "C" ring catwalk for his 20th home run of the season and a 5-4 Tigers lead.
"The one Cabrera hit was a changeup gone awry," Percival said.
Percival is the consummate standup guy and referenced a game earlier in the season when he blew a save in Toronto and the Rays ended up winning anyway.
"They say that the turning point of the season was in Toronto when I stunk it up," Percival said. "So I thought I'd do it again today.
"It's just another day in the life of me, that's what happened. Some days, more often than not, I get the job done. Sometimes I don't. Tonight, I wasn't very good. ... This team doesn't quit. The thing about this team, too, is this bullpen has been so good, it's like every time we do stink it up, they feel obligated to do something. It's incredible."