SAN FRANCISCO (AP) Jake 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.

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.

More from FoxSports

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 Justin Upton's second-inning homer gave the Padres the early lead.

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 Buster Posey and Byrd.

Duffy's two-run double highlighted a four-run outburst in the seventh.

TRAINER'S ROOM:

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.

UP NEXT:

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.