ATLANTA — Robert Gsellman enjoyed a rare double dose of success for a pitcher: He earned a win on the mound while also scoring the go-ahead run in extra innings.

Yoenis Cespedes, who struck out in his previous four at-bats, drove in Gsellman with a tiebreaking single with two outs in the 12th inning to lift the New York Mets to a 5-3 win over the Atlanta Braves on Friday night.

Josh Ravin hit Gsellman with a pitch to open the 12th. The pitch grazed Gsellman's shirt.

"That just can't happen, especially the pitcher being up there," Ravin said. "Just throw strikes. I paid for it."

Gsellman moved to second on Amed Rosario's sacrifice. Michael Conforto popped out before Cespedes delivered the go-ahead hit.

Gsellman is the first pitcher to earn a win and score the winning run in extra innings since Matt Albers for the White Sox on June 1, 2016, against the Mets.

"It's fun to be out there on the bases and run and be part of the game," Gsellman said.

Gsellman (2-0) pitched two scoreless innings. He struck out Preston Tucker to end the 11th with runners on first and second. Jeurys Familia pitched a perfect 12th for his eighth save.

Cespedes blocked out his four strikeouts to give the Mets the lead.

"I think he just goes out there and takes the same approach every time," Mets manager Mickey Callaway said of Cespedes. "I don't think he worries about what's happened. ... Whether things are going good or bad, he's the same guy. That approach usually ends up working in the long run."

Cespedes' single to right field drove in Gsellman from second base. Cespedes scored on Asdrubal Cabrera's double off Ravin (0-1) to right field. Cabrera ran halfway to third before stopping and trying to return to second. A review showed he was out at second, overturning the original call.

New York starter Noah Syndergaard allowed three runs and seven hits, including a homer by Ozzie Albies , in six innings. Atlanta's Sean Newcomb also lasted six innings and gave up three runs, two earned.

Wilmer Flores was thrown out at the plate in the sixth while trying to score from first base on Jay Bruce's high bloop double into shallow left field. Flores was waved around third base, but thrown out at the plate by Preston Tucker. A review confirmed Suzuki made the tag before Flores, sliding head-first, touched the plate.

The double snapped Bruce's 0-for-19 slump.

TRAINER'S ROOM

Mets: LHP Jason Vargas (broken right hand) will make a rehab start Monday in Las Vegas, instead of Sunday as originally planned. He could be in line to join the Mets' rotation late next week, possibly replacing struggling RHP Matt Harvey. Callaway said no decision has been made on Harvey's role.

Braves: Ravin (viral infection) was activated from the 10-day disabled list before the game. RHP Lucas Sims, who recorded only one out while giving up three runs in relief Thursday night, was optioned to Triple-A Gwinnett.

FAN INTERFERENCE

A Braves fan was ejected in the sixth for reaching over the wall on the right-field line and interfering with an attempt by Markakis to catch a foul popup hit by Cabrera. Following a delay of 1 minute, 49 seconds, which showed the ball to be in the field of play, Cabrera was called out. The fan, who was wearing a Braves cap and Braves shirt under his jacket, appeared to be embarrassed as he was booed during video replays before being escorted from his seat.

RARE POWER

Albies became the first middle infielder in Braves franchise history to hit six home runs in April. He entered the game leading the majors with 15 extra-base hits.

UP NEXT

Mets: RHP Jacob deGrom (2-0, 3.24) is 5-3 with a 2.19 ERA in 11 career starts against Atlanta. The 2.19 ERA is the lowest among all active pitchers with at least 10 career starts against the Braves.

Braves: RHP Julio Teheran (1-1, 5.40) will look for his second straight win after allowing one run in six innings in a 2-1 win over the Phillies on Monday.

___

More AP baseball: https://apnews.com/tag/MLBbaseball