PHILADELPHIA — The Rays had a lot to overcome against the Phillies on Saturday, including their shorthanded roster and now somewhat standard assortment of mistakes and missteps. But after coming back with two runs in the ninth against old Red Sox nemesis Jonathan Papelbon to tie, they still came up frustratingly short, losing 7-6 on a walkoff pinch-hit homer by Jim Thome off Jake McGee. "It's definitely a tough loss," starter James Shields said. "We've just got to get better overall. We've got to get better pitching and me doing my job. We've got to get better everywhere. In the past, we definitely finished it off. We did a great job of coming back. We didn't quit — that's a good sign. But it's a tough loss." Manager Joe Maddon praised the players for their attitude and effort as they battled back after a 3-0 lead turned into a 6-3 deficit, but he also acknowledged it was the kind of game that they typically win. "We did a lot of good stuff, but we made a couple mistakes that did hurt us; that's what it comes down to," he said. "We are not that group that normally makes those kind of mistakes that prevent us from winning those one-run games like tonight. We normally win those because we don't make the mistakes. And that's the part of the game we've got to get back badly." The loss was their third in four games on the road trip and seventh in their past 10 as they dropped to 38-32 and are closer to fifth place than first in the AL East. The list of transgressions was lengthy. Shields made a few over his five innings, walking opposing starter Kyle Kendrick before a pop fly homer by Jimmy Rollins, and allowing a two-out hit to pinch-hitter Mike Fontenot. But the most glaring was a three-run homer to Juan Pierre, just his 17th in 7,024 career at-bats. There was a team effort in the seventh, when second baseman Ben Zobrist missed a Pierre grounder, rightfielder Hideki Matsui made a weak throw allowing Pierre to second and catcher Jose Lobaton failed to stop him from stealing third, leading to the Phillies' sixth run. And again in the eighth, when the Rays loaded the bases with no outs against Antonio Bastardo but scored only one run, as Brooks Conrad struck out, Sean Rodriguez singled, Desmond Jennings took a called third strike and Carlos Peña flied out. They did rally, however, in the ninth off Papelbon, who had converted his first 17 saves as a Phillie. Jeff Keppinger, logging his team-record and career-high-tying fifth hit in his first game off the DL, singled in Matsui, then Conrad, in his first game since being claimed on waivers, knocked in pitcher Chris Archer, who was forced into pinch-running duty. The last mistake came from McGee, whom the Rays had to use for a rare second inning given the void in the bullpen left by Joel Peralta's suspension. McGee got to a full count and misplaced a 96-mph fastball to the 41-year-old Thome, who knocked it over the leftfield seats for the 609th homer of his career (tying Sammy Sosa for seventh place) and the 13th walkoff, most all time. "It's a bad feeling," McGee said. Marc Topkin can be reached at email@example.com.