SAN FRANCISCO (AP) Jake Peavy was surprised to learn he beat his former team for the first time. He had thought he earned one last season.
''I guess that was a no-decision,'' he said. ''You know, I enjoy competing. I know a lot of people in that dugout. Other than that, it's just another game.''
Peavy allowed two hits over seven innings, Marlon Byrd had three hits and drove in a run and the San Francisco Giants beat the San Diego Padres 9-1 on Friday night.
Matt Duffy had two hits and drove in two runs for the Giants, who have won four of six following a seven-game losing streak. Buster Posey extended his hitting streak to 11 games.
The Giants, who left 10 men on base, picked up ground on the Los Angeles Dodgers for the first time since Aug. 21. The first-place Dodgers, who lost 12-4 to Arizona, are 7 1-2 games in front in the NL West.
''We know the task at hand,'' Peavy said. ''We're just trying to to get within striking distance and make this thing interesting.''
Justin Upton homered for the Padres, who have lost six of their last eight.
Peavy (6-6) did not walk a batter and struck out two. He retired 17 straight after Upton's second-inning homer gave the Padres the early lead.
''He was good,'' Padres manager Pat Murphy said. ''Let's face it, he's a veteran, a former Cy Young Award winner and he pitched his butt off. He made pitches and when we did hit it hard, they caught it.''
Andrew Cashner (5-15) gave up five runs and nine hits over 4 2-3 innings. He walked five and struck out seven on his 29th birthday.
Angel Pagan, who robbed Matt Kemp of a home run with an over-the-fence grab in the seventh inning, singled home the tying run in the second and the Giants took the lead for good with two runs in the third on RBI singles from Posey and Byrd.
Duffy's two-run double highlighted a four-run outburst in the seventh.
Giants manager Bruce Bochy visited the mound to talk with his son, Brett Bochy, who happened to be pitching the ninth inning. The younger Bochy had given up a hit and then hit a batter after getting the first two outs.
''That was emotional for me,'' the manager said. ''I was caught up and I'm not going to lie. I was influenced by the crowd.''
Allowing his son one more hitter, Brett Bochy struck out Jedd Gyorko to end the game as the crowd chanted ''Bo-chy, Bo-chy,'' throughout the inning.
Padres: RHP Shawn Kelly (strained right forearm) is expected to play long toss Saturday, with the possibility of a bullpen session next week.
Giants: OF Gregor Blanco was diagnosed with a concussion and may miss the remainder of the season. ''He complained after the game in Arizona,'' manager Bruce Bochy said. ''He thinks it's from a slide in LA when his head hit the knee of the infielder. It seemed to get worse.'' ... RHP Matt Cain (elbow) was reinstated from the DL and will pitch out of the bullpen for the time being.
Padres: RHP Ian Kennedy (8-13, 3.99), who starts Saturday's game, has an ERA of 2.48 over his past six starts and is 2-3 over that stretch. In four starts against the Giants this year, he's 2-1 with a 1.69 ERA.
Giants: LHP Madison Bumgarner (17-7, 3.05) is 8-2 since the All-Star break and will be looking to match his career high for wins from last year. He's 8-2 with a 2.02 ERA in 14 home starts.