SAN FRANCISCO (AP) Johnny Cueto didn't see much significance in facing the New York Mets for the first time since Game 2 of last year's World Series.
Getting the struggling Giants back on track and into first place in the NL West was far more important to the All-Star pitcher.
With San Francisco's suddenly rejuvenated offense providing plenty of help, Cueto accomplished both tasks.
Cueto pitched seven effective innings and ended his six-start winless streak, and the Giants broke away late from the Mets 8-1 Friday night.
''This is where we're going to see what kind of team we have,'' Cueto said through a translator after San Francisco's second straight win. ''This is when all the hitters and pitchers have to come together. We have to grind it out until the end.''
Cueto (14-3) allowed one run and eight hits, walking none and striking out two.
The last time he saw the Mets was in October, when he beat them with a two-hitter while pitching for Kansas City.
Denard Span had four hits and Conor Gillaspie homered as the Giants won their second straight over the Mets and moved back ahead of the Dodgers for the NL West lead. Pinch-hitter Ehire Adrianza singled to break a 1-all tie in the seventh.
San Francisco has scored 18 runs with 32 hits in the last two days against the Mets.
''I know we went through a tough stretch but they're good hitters,'' manager Bruce Bochy said. ''It gives you a margin of error, a little cushion. It's important when you can add on.''
Curtis Granderson homered and Jose Reyes added four hits for the Mets.
Before the game, New York activated Yoenis Cespedes and Asdrubal Cabrera from the 15-day disabled list with the hopes they could provide a boost for the Mets' slumping offense.
They each went 1 for 4, and Cabrera's throwing error from shortstop help the Giants score five times in the eighth.
''When you go through bad stretches it is everything,'' Mets manager Terry Collins said. ''You look at different things - a couple of baserunning blunders, a couple of errors there, then all of a sudden the bullpen.''
The lack of hits offset a mostly strong outing from Seth Lugo (0-2) in his first major league start.
Pressed into duty when Steven Matz was scratched late Thursday with a sore left shoulder, Lugo allowed three runs over 6 2-3 innings. He struck out two and walked one.
The Giants chased Lugo with two runs in the seventh then put it away in the eighth.
Granderson homered into McCovey Cove with two outs in the second, his second home run in four games and 20th this season. It's the second time Granderson has reached the waters at AT&T Park and it marked the 40th time an opposing player has done it, including the playoffs.
PAGAN CONTINUES STREAK
Angel Pagan singled in the sixth to extend his hitting streak to 17 games, the longest active mark in the majors. It's three games shy of his career high set in 2012.
Mets: Matz will fly back to New York on Sunday and will have his sore left shoulder examined on Monday. ... LHP Josh Smoker made his major league debut in the eighth inning after being called up from the minors earlier in the day. He gave up two hits and a run while getting one out. ... To make room for the three newcomers, the Mets optioned infielders T.J. Rivera, Ty Kelly and pitcher Josh Edgin to Triple-A Las Vegas. ... Second baseman Neil Walker (back) was held out for the fourth straight game.
Mets: Bartolo Colon (10-7) makes his first start against San Francisco since 2012 when he was pitching for Oakland. The right-hander is coming off a rough outing against Arizona when he lasted a season-low four innings.
Giants: Left-hander Matt Moore (0-2) pitches the third game of the series seeking his first win since being traded from Tampa Bay. He has allowed nine runs over 18 innings with San Francisco.