Juan Uribe and Aaron Rowand each homered for the Giants, who won their 73rd game surpassing last season's total. The Giants trailed Colorado by 1 game in the wild-card race entering Wednesday night.
J.A. Happ (10-4) lost his second straight start for the Phillies.
Phillies manager Charlie Manuel said before the game the Giants were "full of effort and energy" and could be a dangerous team down the stretch. Tim Lincecum and Matt Cain give the Giants perhaps the best 1-2 starters in baseball and having Penny return to the form that saw him twice win 16 games with Los Angeles would bolster their playoff chances.
Penny's lone jam came in the fifth inning when the first two batters reached base. He got All-Star Raul Ibanez to fly out, and escaped the inning without any further damage.
Ibanez, whose torrid first half got him voted an NL All-Star starter, continued his dreadful second-half slide. He went 0 for 3 and has only 10 hits in his last 75 at-bats. He hit 10 homers in May.
Still, no one in the Phillies lineup did much of anything against a suddenly-effective Penny.
The Red Sox might be nipping at the Yankees in the AL East if the righty pitched like this the last two months. It was Penny's longest outing in 28 starts this season and he nearly tossed his first complete game in three years.
Jeremy Affeldt pitched a perfect ninth to close out the five-hitter.
Happ, a leading candidate for NL rookie of the year, allowed four runs and eight hits in six innings. After a one-out walk in the sixth, Uribe hit a 1-2 pitch into the left field seats for his ninth homer that made it 3-0. Rowand, a former Phillie, followed with his 13th homer on the next pitch to help San Francisco go back-to-back for the fourth time this season.
The Giants took a 1-0 lead in the fifth when Andres Torres hit the eighth straight fastball of the at-bat up the middle for a two-out RBI single.
Happ was thwarted in his bid to become the first Phillies rookie to win 11 games since Bob Walk in 1980. The four runs were the most he's allowed in a game in his last seven starts and only the fourth time in 19 starts this season he's allowed four or more runs.
NOTES: The Giants purchased the contracts of LHP Dan Runzler and C Buster Posey from Triple-A Fresno. ... RHP Kyle Drabek and OF Michael Taylor are Philadelphia's winners of the Paul Owens Award for the best pitcher and player in the Phillies minor league system for 2008. Drabek went a combined 12-3 with a 3.19 ERA in 25 games. Taylor hit a combined .320 with 28 doubles, five triples, 20 home runs, 84 RBIs and 21 stolen bases.
(Note: Feel free to leave your thoughts below, but it's for free. You will not earn any pennies. Sorry.)