PITTSBURGH -- Josh Harrison got the game-winning hit and yet all anyone wanted to ask him about was how he wriggled out of that wild rundown an inning earlier.
"The rundown was fun, but the hit was more exciting because it meant the game was over and we won," Harrison said.
Jordy Mercer hit a two-run single for the Pirates (41-39), who moved two games above .500 for the first time since April 10. They have won the first two games of the four-game series.
Pinch-hitter Clint Barmes drew a one-out walk from former Pittsburgh reliever Vic Black (1-2) in the 11th. Mercer struck out before Harrison hit a drive to the 375-foot sign in right-center, scoring Barmes without a throw.
Harrison entered as a pinch hitter in the seventh and squirmed his way out of a long rundown in the 10th. The play drew an argument from Mets manager Terry Collins, who thought Harrison should have been ruled out for running outside the baseline.
Harrison twice avoided a tag by hitting the ground and popping back up.
"Like I learned in middle school -- stop, drop and roll," he said.
Harrison eventually scrambled into third, putting two Pirates runners in scoring position with none out. Jenrry Mejia pitched out of the jam by getting two strikeouts and a fly to right.
Black, acquired from the Pirates late last season in a trade, wasn't as fortunate in the 11th.
Lucas Duda hit a two-run single and rookie Travis d'Arnaud had three hits for the Mets, who played without seven-time David Wright. The third baseman was scratched about 90 minutes before the first pitch with a sore left shoulder and will return to New York on Saturday for an MRI.
Wright, riding a 10-game hitting streak, said the shoulder has been nagging him for a couple of weeks.
"Any loss is going to be tough," said Mets second baseman Daniel Murphy, who had two hits. "Mejia did a great job right there that inning. It's a loss. Losses are tough. I don't know any other way to describe it."
Neither rookie starter figured in the decision but both pitched well. New York's Jacob deGrom gave up two runs and five hits in 6 2-3 innings. Pittsburgh's Brandon Cumpton allowed two runs and six hits in seven innings.
Cumpton is 3-0 with a 2.97 ERA in five June starts after giving up 11 runs in 3 2-3 innings on May 31 in a loss at Dodger Stadium.
"He continues to go out there and compete," Pirates manager Clint Hurdle said. "He keeps going out there and getting things done."
Pittsburgh traded RHP Jason Grilli to the Los Angeles Angels for RHP Ernesto Frieri. Both pitchers were removed as their team's closer on May 20. ... Pittsburgh will activate RHP Gerrit Cole (6-3, 3.64 ERA) from the disabled list Saturday to start against LHP Jonathon Niese (4-4, 2.78). Cole has been sidelined since June 4 with right shoulder fatigue. ... Pirates LF Starling Marte did not start for a third straight game because of a jammed right middle finger, but he pinch-ran in the seventh inning and will likely start Saturday. ... Mets OF Chris Young went 0 for 5 in an increasingly rare start against a right-handed pitcher, playing left field in place of Eric Young Jr. Collins wanted to get Young in the lineup after he hit three home runs in two games against Oakland this week. ... Pittsburgh is 5-4 in extra innings. New York is 5-7.