SAN DIEGO — Cameron Rupp tweaked his swing, and now hitting has become a day at the beach.

Rupp clanked a three-run homer off a palm tree beyond centre field and tied a career high with four RBIs to lift the Philadelphia Phillies over the San Diego Padres 5-4 on Friday night.

Rupp has revamped his swing by trying to stay on top of the ball and it's paying off. He rates among the NL's top five catchers this season with 13 homers and 38 RBIs.

"I can't tell you how much more fun it is when you are hitting home runs and driving in runs," he said. "It's awesome I'm having the success I am having."

Rupp also helped guide starter Jeremy Hellickson (9-7) through another solid start. Hellickson allowed three runs, six hits and two walks in his first start since sticking with the Phillies through the trade deadline despite rumours he might move.

"I'm pitching for these guys," Hellickson said. "I don't know who offered what, but I'm pitching for these guys and that's it."

Jeanmar Gomez pitched the ninth for his 28th save in 30 chances.

Christian Friedrich (4-7) lost for the sixth time in his last seven decisions, surrendering four runs and five hits. He had four strikeouts and hasn't won since June 23.

"I thought (Friedrich) was good today," Padres manager Andy Green said. "He paid for that pitch (to Rupp) but other than that he was really good all day."

Alexei Ramirez's first career pinch-hit homer in the seventh pulled the Padres within 4-3 and chased Hellickson. Travis Jankowski followed with a single and appeared to stretch it to a double, but after Jankowski was ruled safe on Tyler Goeddel's throw, the call was overturned because Jankowski took his hand off the bag before calling time.

The Phillies scored in the eighth on Tommy Joseph's single to make it 5-3. In the bottom half, Wil Myers' hit a homer for his third hit of the game, slicing the deficit to 5-4.

Rupp padded the Phillies' cushion to 4-2 in the sixth when his RBI single scored Franco, who reached on a one-out single.

Jankowski scored in the third for a 2-0 Padres lead. He singled and advanced to second on Myers' single. Hellickson then balked both runners up 90 feet and Jankowski came in on Jose Rondon's run-scoring single.

The Padres struck in the second, using speed and two singles.

Alex Dickerson opened with a hit and swiped second. Two outs later, Rondon's single brought in Dickerson for a 1-0 advantage.

Myers' homer was his 21st of the season and his 15th at Petco Park, which ties a franchise record.

TRAINER'S ROOM

Padres: RHP Colin Rea will undergo season-ending Tommy John surgery on his right elbow. Rea was traded to the Marlins recently and injured his arm in his first start on July 30. The Marlins claimed the Padres weren't forthright with Rea's medical reports and the Padres agreed to reacquire Rea.

UP NEXT

Phillies: RHP Jake Thompson makes his major league debut in the second contest of the three-game series. Thompson, who was acquired last year from Texas in a package for Cole Hamels, went 8-0 over his last 11 starts at Triple-A Lehigh Valley.

Padres: RHP Paul Clemens (1-2, 4.70) makes his third start for the Padres after being claimed off waivers in July. Clemens left his last outing on Sunday against the Reds with a sore back after 4 1/3 innings. He took the loss after giving up two runs on four hits and one walk while striking out five.