Updated

Flushing, NY (SportsNetwork.com) - Ryan Vogelsong pitched his second career complete game, Hunter Pence knocked in three runs and the San Francisco Giants beat the New York Mets 5-1 on Friday in the opener of a four-game series.

Vogelsong (6-8) went the distance for the first time since 2011, limiting the Mets to one run on two hits and a walk with five strikeouts to snap a five- game losing streak.

Brandon Crawford went 3-for-4 with an RBI and Matt Duffy added an RBI in his major-league debut for the Giants, who have won two straight after a six-game skid.

Jon Niese (5-7) was charged with five runs -- three earned -- on nine hits with four strikeouts over eight-plus innings in the setback.

San Francisco opened the scoring in the second with help from a costly error by Niese. Juan Perez doubled to lead off, then Gregor Blanco tapped a grounder back to Niese, who alertly checked Perez at second. However, Niese skipped a throw to Ruben Tejada which allowed Perez to advance to third. Crawford followed with a single to center past the drawn in infield that plated Perez.

A sacrifice bunt from Vogelsong put a pair of runners in scoring position before Pence's groundout knocked Blanco in for a 2-0 lead.

Vogelsong didn't allow a baserunner until Curtis Granderson began the fourth with a walk. Daniel Murphy then grounded into a 6-4-3 double play and David Wright flied out to right to end the inning.

Juan Lagares recorded New York's first hit to lead off the sixth with a single to center. Following a groundout by Tejada, Niese lined into an inning-ending double play.

The Giants broke the game open with a three-run seventh. Crawford tripled to right with one out, Vogelsong was hit by a pitch and Pence chased them home with a triple to right-center. Duffy's first major-league hit was a single to left that scored Pence.

Lucas Duda ended Vogelsong's shutout bid with his 20th homer of the season in the eighth.

Vogelsong, who hadn't won since June 21 at Arizona, wrapped up the gem with a 1-2-3 ninth inning as the game ended after just 2 hours and 6 minutes.

Game Notes

Prior to the game, the Giants designated second baseman Dan Uggla for assignment. Uggla went hitless in four games with the Giants. He struck out six times in 11 at-bats and committed three errors. San Francisco also designated outfielder Tyler Colvin for assignment and purchased the contracts of Duffy and Jarrett Parker from Double-A Richmond ... Niese threw 87 pitches in the loss, 68 for strikes ... Duda has never hit 20 homers prior to this season. His previous career high was 15 in both 2012 and 2013.