NEW YORK (AP) Michael Cuddyer and the New York Mets got one big hit after another Thursday night. Quite a contrast from the series opener against San Francisco, when they didn't muster any.
Cuddyer singled home the winning run in the bottom of the ninth inning, and the Mets topped the Giants 5-4 to prevent a three-game sweep and move back into first place in the NL East.
''It's huge morale-wise for us,'' manager Terry Collins said. ''Today was a big one.''
Curtis Granderson scored twice and drove in a run to help New York win on a 91-degree night when chants of ''Let's go Giants!'' rang out at Citi Field. The Mets beat the defending World Series champions for only the second time in 11 meetings, rebounding from a pair of humbling losses to start the series.
San Francisco rookie Chris Heston pitched a no-hitter Tuesday, and Mets ace Matt Harvey was hit hard again the following night. So when New York finally pulled this one out, no wonder it was a relief.
''Hard-fought series. Good road trip,'' Giants manager Bruce Bochy said. ''You'd like to get greedy and get this one, but we just couldn't hold the lead.''
Sergio Romo (0-3) hit Granderson in the back on an 0-2 pitch with one out in the ninth. Granderson advanced to second on Andrew Susac's passed ball and third on Juan Lagares' groundout before Lucas Duda was intentionally walked.
Cuddyer, who had a go-ahead double in the fifth, stroked a sharp single into center field and raised his right arm as he headed for first base, just ahead of the swarm of teammates that chased him down to celebrate.
''It's definitely a good feeling,'' Cuddyer said. ''To get swept at home ... leaves a bad taste in your mouth.''
It was Cuddyer's first game-ending hit in nine years.
''I knew it'd been a long time because I don't remember the last one,'' he said with a smile.
Reminded it was a pinch-hit homer for Minnesota against the Angels on April 19, 2006, he said: ''I do remember it then!''
Jeurys Familia (2-0) pitched a scoreless inning for the win.
Mets starter Jonathon Niese went seven innings in his second consecutive encouraging performance. He got 15 outs on the ground after entering 0-4 with a 7.96 ERA in his last five games.
''A good outing to build on. My stuff felt great,'' Niese said. ''My mechanics are more sound.''
The left-hander retired 12 in a row before substitute third baseman Eric Campbell committed a two-out error in the sixth. Brandon Crawford followed with his ninth homer, a long drive into the Giants' bullpen in right-center that gave San Francisco a 4-3 lead.
Hunter Strickland gave up three straight Mets hits to the start the seventh, including a leadoff double by pinch-hitter Darrell Ceciliani and Granderson's tying single.
Tim Lincecum held the Mets hitless until Travis d'Arnaud blooped an RBI double with two outs in the fourth. Niese opened the fifth with a double to deep center and scored on Duda's sacrifice fly. Cuddyer put the Mets up 3-2 with a two-out RBI double.
''I felt good all night,'' Cuddyer said.
Looking to win his seventh straight decision against New York, Lincecum was lifted after 4 2-3 innings.
The first four batters reached safely against Niese, and San Francisco scored on Buster Posey's run-scoring single and Justin Maxwell's double-play grounder.
''A big boost,'' Niese said. ''It could have got out of hand real quick.''
Giants: All-Star outfielder Hunter Pence (left wrist tendinitis) missed his seventh straight game and did not take any swings. Bochy said the team will make a decision about putting Pence on the disabled list when it returns home Friday to play Arizona. ''Still in a holding pattern with him,'' Bochy said. A potential replacement from the minors will be ready to meet the club in San Francisco, he said.
Mets: Rookie C Kevin Plawecki (dizziness) saw another doctor and had more tests. ''He's just got a real clogged sinus,'' Collins said. ''The pressure of flying has caused him to have some of the headaches and the dizziness. Once we get that cleared up, which they think they can, he'll be a lot better.'' Now that they have a diagnosis, though, the Mets should be able to option Plawecki to the minors or place him on the disabled list to make room for a backup infielder Friday. ... LHP Jerry Blevins (broken left arm) is healing but is not yet ready to throw. ''I think he's pretty much on track,'' general manager Sandy Alderson said.
Niese, who went seven innings, has yielded 11 unearned runs in 12 starts this season. New York has made 13 errors with Niese on the mound, most for any National League team behind one pitcher.
''It is what it is,'' he said. ''It's part of the game.''
San Francisco was trying for its first sweep of the Mets in New York since May 2002 at Shea Stadium.
Giants: LHP Madison Bumgarner (7-2) faces Chase Anderson (1-1) and the Diamondbacks on Friday night. San Francisco has lost its last five home games.
Mets: Bartolo Colon (8-4) starts the opener of a three-game series against Alex Wood (4-3) and the Atlanta Braves.