Giants 4, Mets 1:
Tim Lincecum tossed seven solid innings and host San Francisco scratched for a pair of runs on shortstop Ruben Tejada's error to snap a season-high five-game losing skid.
Marco Scutaro had an RBI single in the eighth inning for the Giants, who acquired two-time All-Star Hunter Pence from Philadelphia for fellow outfielder Nate Schierholtz, minor-league catcher Tommy Joseph and right-hander Seth Rosin.
Lincecum (5-11) capped a brilliant performance by striking out David Wright with the bases loaded in the seventh inning. The two-time National League Cy Young Award winner improved to 5-1 in his career versus the Mets after allowing one run on six hits while striking out seven.
San Francisco quickly loaded the bases in the second inning before Buster Posey was thrown out at home. Brandon Crawford then grounded into what should have been an inning-ending double play, but Tejada's throw sailed wide of first base to allow both Scutaro and Brandon Belt to score.
Jeremy Affeldt worked the final two innings for his second save.
Making his second career start, Mets rookie Matt Harvey (1-1) permitted three runs on four hits and struck out seven in six innings.
Justin Turner opened the scoring in the second inning with a line-drive double over the head of left fielder Melky Cabrera. Scott Hairston had a pair of hits for the Mets, who fell for the 15th time in 19 games.
GAME NOTEBOOK: Hairston improved to 9-for-19 in his last five games. ... Harvey has recorded more strikeouts (18) in his first two major-league starts than any pitcher in Mets' franchise history. ... Lincecum struck out eight in five innings to post a 6-1 win over the Mets on April 23.