NEW YORK (AP) -- Reliever Mark Melancon said his heart sunk. Second baseman Brandon Inge figured, that's it, two runs. Pedro Alvarez watched from third base and tossed his head back, disappointed.
Still, Inge tracked Lucas Duda's scorching grounder up the first-base line and Melancon broke for the bag.
Good thing, too. The baseball struck first base and shot straight up in the air, maybe 20 feet.
With Duda lumbering down the line, Inge ranged behind first and took a small hop to catch the ball. He then whipped a throw to Melancon for the final out of the eighth inning, possibly saving two runs and helping Pittsburgh beat the New York Mets 3-2 Sunday.
"Inge stayed with the play, Melancon finished his route right to the bag, and we get the out," Pirates manager Hurdle said. "Our guys didn't quit once maybe a little adversity was thrown at them."
Alvarez hit a tiebreaking RBI single in the top of the eighth against New York's overworked bullpen. Clint Barmes homered, Garrett Jones had a sacrifice fly and Jeanmar Gomez left with a lead against young ace Matt Harvey as the Pirates finished the four-game series with their third straight win.
Mets relievers had pitched 13 innings over the previous three games, so manager Terry Collins was looking for another deep effort from Harvey in his 18th big league start following a nine-inning, one-hit gem on Tuesday. Harvey went seven, lifted for a pinch-hitter with the score 2-all.
Scott Rice (1-2) walked Pirates slugger Andrew McCutchen with one out in the eighth before Brandon Lyon walked pinch-hitter Gaby Sanchez. Lyon struck out pinch-hitter Jose Tabata, then gave way to closer Bobby Parnell.
Alvarez, who played high school ball in New York City, singled to left-center for a 3-2 lead.
"It's always good to come back home and have a good series," said Alvarez, who was 6 for 11 against the Mets to raise his average above .200 for the first time since the opening week of the season. "It's icing on the cake."
The Mets had an opportunity in the eighth against Melancon, putting runners on first and third with one out. Ike Davis struck out as David Wright swiped second -- New York's fourth stolen base of the day -- before Duda hit the wicked grounder. When Inge caught the ball, he made a strong throw to Melancon, drawing gasps from many of the 28,404 in attendance.
"I assumed the worst," Inge said. "Threw a bullet to him. At that point I figured it was a make-or-break play -- the catch was on him."
Melancon threw his arms up in the air after stepping on first, not in celebration but to show the umpires he had caught it. Melancon said the ball skipped off the heel of his glove, rolled up his arm and across his chest before grabbing it with his bare hand.
"I don't remember seeing the ball," Melancon said of Inge's throw.
Said Duda: "Anything could happen in that situation. You didn't know which way it was going to ricochet or what's going to happen. But it is what it is."
Jason Grilli had a much easier time in the ninth, finishing with a perfect inning for his 15th straight save to start the season.
Gomez gave the Pirates another solid start in place of injured James McDonald, yielding one run in five innings. He said he came out after five because of tightness in his right calf. He expects to be fine for his next start.
Unlike Gomez's previous outing, when five relievers combined to finish the victory, Pittsburgh's bullpen gave up the lead in the seventh on Mike Baxter's looping single off Justin Wilson (3-0) that tied it at 2.
The Mets finished their homestand 2-4 and were 7 for 40 with runners in scoring position -- including 1 for 7 on Sunday.
"You talk about how we're snake bit, but that's just part of the game," Collins said. "What's the next thing that's going to keep us from having a big game? But we won two games on this homestand by getting a couple of big hits. We've just got to start hitting with guys in scoring position like we did early and we did last year in the first half."
Collins tried to jolt his lineup by restoring slumping sluggers Ike Davis and Duda back into the middle of the order, and the move paid quick dividends when Duda homered to center field. He ran around the bases in his pink spikes on Mother's Day as New York went up 1-0.
But the no-nonsense Harvey appeared out of sorts from the start -- maybe it was Buck using pink stick-ons on his fingernails rather than the usual white to make pitch signs more easily readable.
Relying more heavily on his slider and curveball than a fastball that reaches 98 mph, Harvey gave up two runs in the third, and it could've been worse if Juan Lagares hadn't made a sensational catch in center field.
After Barmes led off with his second homer of the season, Gomez hit a sinking liner and Lagares reached low to get his glove on the ball, which popped out as he stumbled forward. Lagares' momentum carried him into a dive and he made the catch -- for good -- as he fell to the turf.
Harvey then loaded the bases on two walks sandwiched around a single. Jones hit a sacrifice fly for a 2-1 lead and Jordy Mercer popped out to end the inning.
NOTES: Pittsburgh improved to 6-13 at Citi Field since it opened in 2009. ... Pirates RHP Charlie Morton (elbow surgery) is scheduled to make a rehab start Thursday at Double-A Altoona. He is targeted to throw four innings and 65 pitches. ... Pirates RHP Jeff Karstens (shoulder inflammation) is set to make a rehab start in the Class A Florida State League on Monday. He is slated to throw 50 pitches and three innings.