Updated

Carlos Pena connected early and Darwin Barney delivered late. That wasn't enough for the Chicago Cubs, though, because the New York Mets still had a few swings left.

Justin Turner doubled in the game-winning run off Sean Marshall with two outs in the ninth inning and New York beat the Cubs 5-4 on Friday night only moments after Chicago tied the score.

"We battled it all the way to the end and we gave ourselves a shot," Pena said. "We had one of our best on the mound and they beat us. That's the only way to look at it."

Turner also had a tiebreaking double in the fifth and finished with three hits. Jason Bay doubled twice and threw out a runner at the plate for New York in the opener of a weekend series that culminates Sunday night with a pregame ceremony to mark the 10-year anniversary of 9/11.

The Mets are offering free tickets to New York City first responders and their families for that game.

Bay and David Wright each had an RBI to help the Mets overcome an early 3-0 deficit for their 11th victory in 16 games. Mike Pelfrey recovered from a rocky start as New York evened the all-time series against the Cubs at 345-345 with two ties.

"He pitched a great game," Pena said. "He was masterful."

Late in a lost season, the Mets are trying to groom a potential closer for the future. Bobby Parnell has failed to grab hold of the role, however, and Manny Acosta (3-1) couldn't put this one away.

Acosta, who saved a 1-0 win Wednesday at Florida, gave up a tying single to Barney with two outs in the top of the ninth. Aramis Ramirez flied out to end the inning, but the crowd of 27,639 let Acosta hear it.

His teammates responded right away.

Nick Evans singled off Marshall (6-6) to open the bottom half and pinch-runner Jason Pridie advanced on Josh Thole's sacrifice. After pinch-hitter Ruben Tejada hit a soft liner for an out, Jose Reyes was intentionally walked.

Turner hit a long drive to center over the head of Marlon Byrd, who was playing shallow. The ball bounced on the warning track and over the fence — it was initially ruled a single, then changed to a ground-rule double.

"Just kind of hung that curveball down the middle and Turner put a good swing on it," Marshall said. "The ball stayed in the air for a while, the ball kind of carried and that was it."

Turner touched second and was swarmed by excited teammates. Then he was pelted in the face with a cream pie during a TV interview on the field.

"Of all the guys on the team, he probably has the most disciplined swing in those situations," Mets manager Terry Collins said. "He just wants to put the bat on the ball. He doesn't care where it goes."

Pena extended his power surge with a long two-run homer for Chicago, which has lost 12 of 18. Bryan LaHair had an RBI triple before he was thrown out by Bay at the plate on pitcher Casey Coleman's fly to left.

Reyes, trying to hold off Milwaukee's Ryan Braun for the NL batting title, blooped a ground-rule double in the fifth and scored on Turner's soft double to put the Mets up 4-3. Reyes has hit safely in all 12 games since returning from the disabled list.

Pelfrey caught a break in the seventh when pinch-hitter Blake DeWitt hit a one-out grounder that appeared headed into right field for a single that could have put runners at the corners. But the ball bounced up and hit pinch-runner Tony Campana for the second out.

After Starlin Castro was hit by a pitch, Josh Stinson retired Barney on a fly ball to end the inning.

Pelfrey loaded the bases with one out in the first, prompting a visit from pitching coach Dan Warthen. The big right-hander then struck out Alfonso Soriano and got Byrd on a liner to shortstop to escape unscathed after 29 pitches.

Pena homered in the third, his fourth in eight games — including a three-run shot in the eighth inning to beat Cincinnati on Wednesday. Pelfrey had gone a season-high seven straight starts without allowing a home run.

The Cubs appeared ready to break it open in the fourth when LaHair tripled home a run with nobody out to make it 3-0. But with the infield in, Wright made a tough grab on Geovany Soto's liner and then Coleman lofted a fly to medium left.

Bay made a wide throw to the plate but it was good enough to get the lumbering LaHair. Cubs manager Mike Quade came out to argue the call.

"I thought I was safe," LaHair said. "Just one of those plays that didn't go our way."

Turner's leadoff single and an RBI double by Bay keyed New York's three-run fourth.

NOTES: Barney rejoined the team in time for batting practice. He flew in from Oregon following the birth Wednesday of his daughter, Zoey Jane Leilani. ... RHP Randy Wells (7-4) tries to extend his career-best five-game winning streak when he starts Saturday for Chicago against LHP Chris Capuano (10-12), who is 8-3 against the Cubs. ... Coleman, a third generation big league pitcher with a funky delivery, hasn't won in the majors since May 19 at Florida. ... This is the Cubs' first visit to Citi Field since April 2010.