Phillies 7, Rays 6: Philadelphia closer Jonathan Papelbon blew his first save of the season, but Jim Thome got him off the hook with a walk-off homer off Jake McGee in the bottom of the ninth.
Brooks Conrad, making his Rays debut after being claimed on waivers earlier in the week, lined a game-tying single to right in the ninth against Papelbon (2-2), who was due up first in the bottom of the inning.
Thome pinch hit and blasted a 3-2 fastball from McGee (2-2) to the opposite field for the 609th homer of his career, and his 13th walkoff shot. Jimmy Rollins and Juan Pierre also homered for the Phillies.
The 41-year-old Thome tied Sammy Sosa for seventh place on the career home run list and set a major-league record for the most walk-off homers to help Phillies manager Charlie Manuel earn his 900th career victory.
Tampa Bay has lost three straight and seven of 10. The Phillies have won three of four to begin a 10-game homestand.
The Rays took a 3-0 lead on Jeff Keppinger's two-run double and James Shields' RBI groundout in the second, but Shields couldn't hold the lead.
Rollins took him deep to right for a two-run shot in the third, hooking a 1-0 changeup just inside the foul pole for his sixth home run. Pierre turned on a 2-1 changeup an inning later for a three-run blast to right, his first of the season. The Phillies didn't trail again.
The Rays loaded the bases with no outs in the eighth against Antonio Bastardo, but the left-hander limited the damage to one run on Sean Rodriguez's RBI single.
Tampa Bay scored twice against Papelbon in the ninth, plating one on Keppinger's RBI single and tying it on Conrad's clutch hit.
Keppinger went 5-for-5 with three RBIs in his first game since being activated from the disabled list.
Shields allowed five runs on seven hits in five innings. He struck out seven. Phillies starter Kyle Kendrick lasted just four innings, allowing three runs (two earned) on six hits.
GAME NOTEBOOK: Thome's walk-off blast snapped a tie with Babe Ruth, Jimmie Foxx, Mickey Mantle, Stan Musial and Frank Robinson. ... Pierre's home run was his 17th in 13 major-league seasons and his first since Aug. 16, 2011, against Cleveland. … Keppinger matched a career high for hits and became the fifth Rays player with five hits in a game. … Shields has just one win in his last seven starts.