Pinch-hitter Jim Thome hit a home run leading off the bottom of the ninth inning to lift the Phillies over the Tampa Bay Rays 7-6 on Saturday after Jonathan Papelbon blew his first save in 18 chances this season.
Juan Pierre and Jimmy Rollins also homered for the Phillies, helping manager Charlie Manuel earn his 900th career win.
Thome connected off Jake McGee (2-2) for home run No. 609, tying Sammy Sosa for seventh place on baseball's career list.
In the first meeting at Citizens Bank Park between this teams since Philadelphia won the 2008 World Series, the Phillies rallied from a 3-0 deficit against James Shields with homers from their Nos. 1-2 hitters. But Papelbon couldn't hold the lead.
Thome then came through to lead the five-time defending NL East champions out of last place for the first time since May 4. He hit a high drive to left field, circled the bases to a rousing ovation and got a cream pie in the face afterward on the field.
Tampa Bay's Jeff Keppinger was 5 for 5 with three RBIs in his first game after he missed 29 because of a broken toe.
Papelbon (2-2) allowed his first earned runs in a save situation this season. He walked Jose Lobaton with two outs to extend the game. Keppinger followed with an RBI single. Then, Brooks Conrad ripped a run-scoring single to right to tie it. Conrad was 3 for 41 before that hit.
Shields, who beat the Phillies in Game 2 of the `08 Series for Tampa Bay's only win, allowed five runs and seven hits in five innings. Since starting 5-0, Shields is 2-4 with a 4.69 ERA.
Tampa Bay has lost three straight.
Shields fanned the first two batters in the fourth before getting in trouble. Pinch-hitter Mike Fontenot and Rollins hit consecutive singles. That brought up Pierre, who hadn't gone deep in 366 at-bats, dating to Aug. 16 with the Chicago White Sox. Pierre lined career homer No. 17 over the right-field fence, and strutted down the line with a finger pointed in the air.
Pierre reached on a two-base error, hustling his way to second base in the seventh. Carlos Ruiz looped an RBI single to right off Brandon Gomes to make it 6-3.
The Rays loaded the bases with no outs in the eighth against Antonio Bastardo, but only got one run on an RBI single by Sean Rodriguez.
Kendrick got Philadelphia started in the third with a leadoff walk. Rollins followed with a drive that hooked inside the right-field foul line to cut the deficit to 3-2. The Phillies had runners on first and third with one out, but couldn't push across the tying run. Ty Wigginton struck out and Placido Polanco flied out.
Kendrick allowed three runs and six hits in four innings, striking out six. He is 1-3 with a 7.36 ERA in five starts since shutting out St. Louis on May 26.
Kendrick retired the first four batters before unraveling with one out in the second. He allowed a single to Ben Zobrist and walked Lobaton. Keppinger followed with a two-run double down the left-field line. He advanced to third on a throwing error by second baseman Michael Martinez and scored on Shields' groundout for a 3-0 Rays lead.
Fan, follow and download: Get the latest from NBCPhiladelphia.com anytime, anywhere. Follow us on Twitter, Facebook and NBC Philadelphia. Sign up for our sports newsletter. And, get breaking news delivered right to your mobile phone -- just text PHIBREAKING to 639710 to sign up. (Message and data rates may apply.)