PHILADELPHIA (AP) -- Khalil Greene is developing a knack for clutch hits.
Jake Peavy pitched seven strong innings and hit his first career homer for the Padres, who snapped an 11-game losing streak to Philadelphia that dated to the 2004 season.
Greene is hitting just .231, but he has 11 homers and 45 RBI and is building a reputation for delivering key hits at the right time. The third-year shortstop had a game-winning two-run single in the ninth inning against San Francisco last Friday. Earlier this season, he hit a three-run homer in the eighth inning of a 3-0 victory over Los Angeles.
"I try not to overanalyze the situation and put a good swing on the ball," Greene said.
San Diego, which came in tied for first place in the NL West, ended a three-game losing streak. The struggling Phillies had won two in a row after losing 17 of 22.
Mike Piazza singled off Arthur Rhodes (0-3) with one out in the ninth inning. Pinch-runner Eric Young went to second base on a wild pitch and pinch-hitter Josh Bard was intentionally walked. Gordon came in and Greene hit a 2-0 pitch into the left-field seats.
"I didn't think it was hit that hard. That's the way things are going now," Gordon said.
Greene hit .273 as a rookie in 2004 and batted .250 last season when he had a career high 70 RBI and ties his best with 15 homers. He's on pace to hit 21 homers and drive in 87 runs this year. Manager Bruce Bochy will trade the lower average for bigger power
numbers from his No. 5 hitter.
"He's a dangerous hitter," Bochy said. "Even though you look at his average, he can beat you with a single or the long ball."
Linebrink came in and Utley lined his first pitch to right field for an RBI double to cut it to 3-2. Bobby Abreu was intentionally walked, but Rollins scored on Ryan Howard's double-play grounder to second base to tie it at 3. Pat Burrell flied out to end the inning.
Peavy allowed three runs and six hits, striking out nine for his fourth consecutive solid outing. He put the Padres ahead 3-1 with a two-run shot in the fifth inning. Peavy was 3-for-30 this season before ripping Mathieson's first pitch into the left-field seats.
An All-Star last year, Peavy has struggled this season. He entered with an ERA of 4.50 after posting an ERA under 3.00 the previous two seasons.
But Peavy has pitched well since allowing 17 runs in 13 2/3 innings over three starts from May 28 to June 11. He has given up 10 runs in 29 innings over his last four starts.
"I'm not worried if I win the game," said Peavy, who is just 4-8. "The last couple outings, I've felt good."
The Phillies took a 1-0 lead in the second inning when Aaron Rowand scored on a passed ball by Piazza. Rowand doubled to right field and went to third base when Burrell was easily thrown out at the plate on a relay throw by second baseman Josh Barfield. But Piazza couldn't handle an inside pitch to David Bell, allowing Rowand to score. Bell followed with a two-out double to left field.
Piazza's RBI single in the fourth inning tied it at 1.
Piazza has more RBI (127) against the Phillies than any other team. ... Rollins hit into his team-leading 11th double play. ... Abreu has reached safely in 30 straight games. ... The Padres hadn't beaten the Phillies since May 22, 2004, in Philadelphia.