Penny kept his emotions in check and worked seven strong innings to beat his former club, Juan Uribe hit a two-run homer and the Giants avoided a sweep by rival Los Angeles with a 7-2 victory over the first-place Dodgers on Sunday.
"Honest to God, I swear, I don't care who we're playing," Penny said. "We're in a playoff race and we can't lose to anyone."
Los Angeles' lead in the NL West remained at three over Colorado after the Rockies lost again at San Diego. The Giants moved within 4 1/2 games of Colorado in the NL wild-card race.
"There's no getting around it, it was a must-win for us," San Francisco skipper Bruce Bochy said.
The Rockies come to San Francisco for three games starting Monday night and Giants ace Tim Lincecum will return to the mound for the opener after missing his last start with a back injury. Fans cheered when Colorado's 7-3 loss was shown on the scoreboard before the top of the ninth.
"I don't think you make it big," outfielder Randy Winn said of the next series. "We need to win ballgames, bottom line -- whether it's the Dodgers, Rockies, Diamondbacks or Padres. We have to handle our business. We can't look ahead and worry about what other teams are doing."
Uribe had three hits, as did Travis Ishikawa, who added an RBI double for San Francisco, which ended a four-game home losing streak that matched its longest of the year. The Giants' offense finally woke up after being outscored 19-4 in the first two games of the series.
"The way the first two games had gone -- we got beat up pretty good -- we knew what was at stake today," Bochy said.
"You're happy when you win two out of three, but when you win the first two you get a little greedy," Torre said.
Penny (3-0) has a perfect record since signing with the Giants on Aug. 31 -- after losing his final four decisions with the Red Sox before they released him.
Before his stint with Boston, Penny spent four-plus seasons Los Angeles. The burly right-hander posted back-to-back 16-win seasons in 2006 and '07 then was slowed by shoulder trouble last year. Third-base coach Larry Bowa questioned Penny's work ethic last year and Penny left on sour terms. Those two talked Saturday to clear the air.
"That's all over with," Penny said. "I think when I pitch with emotion I'm a little more focused."
The Dodgers got a scare when first baseman James Loney lunged to his left trying to make a play on Nate Schierholtz's double down the line leading off the fourth. Loney collided with first-base umpire Sam Holbrook, Loney's head going into the midsection of Holbrook. Loney fell to the ground, grabbing the back of his neck. Torre rushed out, along with athletic trainer Stan Conte, but Loney got up after several minutes and stayed in the game.
Uribe homered in the second to put San Francisco ahead. The Giants added a pair of insurance runs in the sixth on a bases-loaded walk from Jeff Weaver and a wild pitch by Ronald Belisario, then scored two more on Freddy Sanchez's two-run single.
Chad Billingsley (12-10) had his winless stretch reach five starts, going 0-4 during that span since beating St. Louis on Aug. 18. The Dodgers missed out on their first three-game sweep at AT&T Park since July 13-15, 2007.
Billingsley was tagged for eight hits and three runs in four innings, but he struck out six and didn't walk a batter for the fifth time in 2008.
"I'm not getting hit around that hard but I do expect more out of myself," Billingsley said. "I'm just trying to figure something out and get turned around."
The Giants honored LHP Jonathan Sanchez's no-hitter from July 10 during a pregame ceremony. ... Torre hopes LHP Randy Wolf, nursing an irritated elbow that required a cortisone shot and caused him to miss his scheduled start Friday, will pitch Tuesday against Pittsburgh. The Dodgers don't yet know when LHP Clayton Kershaw will return after he missed his weekend outing because of a bruised right shoulder. ... San Francisco C Bengie Molina had the day off. ... Torre on Serena Williams' U.S. Open tirade directed at a line judge: "That was a little shocking. ... The thing I feel bad is, the tirade she went on, you have someone trying to do their job. It's not a fair fight." ... The Giants sold out for the 19th time.