Giles, who had four hits in his last 52 at-bats, hit a go-ahead three-run homer with two outs in the ninth, and the Padres ended a four-game losing streak with a 6-4 victory over the San Francisco Giants on Tuesday night.
"I think Trevor Hoffman said it best: We might not be the most talented team -- and that's been the case maybe the last three or four years -- but when you're stronger as a team than you are on your own, this team always responds," Giles said. "This is a position where we control our own destiny and these games should be a lot of fun for us."
The win gave San Diego a one-game lead over Philadelphia in the wild-card standings after the Phillies lost 10-6 to Atlanta. And the Padres also pulled within two games of NL West-leading Arizona, which lost 6-5 at Pittsburgh.
"This is what gets the blood pumping in the players," first-year Padres manager Bud Black said. "They relish the games in September, and this was a great moment for the team. Brian showed why he's been the hitter he's been in his career. ... This was a big team win. We've got to win again tomorrow. This is nothing to rest on."
The Padres and ace Jake Peavy will have to face Barry Bonds in the slugger's home finale for San Francisco on Wednesday night. Bonds, who was told last Thursday he won't be re-signed for 2008, has missed the last 10 games nursing a sprained big right toe.
"Barry is going to start tomorrow," manager Bruce Bochy said. "He's ready to go. We'll see how he feels, how he's doing. Yeah, it would have been nice to use him tonight but the toe is still bothering him."
Joe Thatcher (1-1) pitched 1 1/3 innings for his first major league win in his 18th career appearance. Hoffman finished for his 41st save in 46 chances.
The Padres had been swept by Colorado at home last weekend, losing center fielder Mike Cameron and left fielder Milton Bradley to injuries. Cameron will be out at least for the rest of the regular season, while Bradley will need knee surgery.
"No doubt Sunday hurt a lot -- not the loss but the people we lost," Giles said. "We picked away. This team has a track record of doing that."
Cain struck out eight but wound up seeing his winless stretch reach five consecutive starts.
Randy Winn's 13th homer of the season, a two-run shot to straightaway center, highlighted San Francisco's four-run second against former Giant Brett Tomko. Dave Roberts added an RBI double and Kevin Frandsen singled in a run.
Winn later doubled, becoming the sixth San Francisco player to have 40 doubles in a season. Jeff Kent last did it with 42 in 2002.
But that was all the Padres could do against Cain, who hasn't won since Aug. 28 against Colorado. He is winless in six starts against San Diego this season and is 0-3.
Cain allowed five hits and two runs in seven innings and walked one. He reached 200 innings for the first time in his career, becoming the third San Francisco pitcher to do so before turning 23. Mike McCormick did it at 20, 21 and 22 (1959-61), and John D'Acquisto accomplished the feat at 22 in 1974. Cain was 22 years old and 350 days.
Fans chanted "Barry! Barry!" in the eighth inning but No. 25 never showed.
Tomko, who had won his previous two outings, allowed four runs and six hits.
- The Padres called up OF Drew Macias and switch-hitting INF Chase Headley from Double-A San Antonio. Both players joined the team, along with OF Jason Lane a day after he was acquired in a trade with Houston for a player to be named or cash.
- LHP Barry Zito is slated to start Sunday's season finale for the Giants -- and the $126 million pitcher wants one more opportunity. "I haven't turned it off mentally," Zito said. "I'm ready to go. I still have things to prove."