MIAMI (AP)Starling Marte homered, tripled and drove in three runs, Brandon Nimmo broke an eighth-inning tie with a two-run shot and the New York Mets overcame two early deficits to defeat the Miami Marlins 6-4 on Friday night.

Nimmo finished with three RBIs from the leadoff spot and Marte was a double short of the cycle for the NL East leaders, who won their fourth straight and maintained a three-game lead over second-place Atlanta.

Pinch-hitter Eduardo Escobar reached on an infield single leading off the eighth against reliever Steven Okert (5-1) and advanced on Tomas Nido’s sacrifice bunt. Nimmo then drove an 0-1 pitch from Okert over the wall in right-center.

After snapping a 3-for-22 skid, a fired-up Nimmo flashed plenty of emotion as he rounded the bases and celebrated with teammates in the dugout.

”A real desire to want to come through for the guys, help out and contribute offensively,” Nimmo said. ”When I got a hold of it, I was pretty ecstatic.”

Daniel Vogelbach doubled twice for the Mets, who had eight extra-base hits – six against Marlins All-Star starter Sandy Alcantara.

”We probably caught him on one of those very rare days when he wasn’t his normal self,” Mets manager Buck Showalter said. ”You have to take advantage of it.”

In his shortest outing since May 6, Alcantara completed five innings. He allowed four runs and a season-high eight hits in his fourth start against the Mets since June 19. He walked three and struck out five.

After 13 consecutive outings of at least seven innings, the right-hander has lasted 11 innings total in two starts since the All-Star break.

”Today wasn’t my day. I feel bad,” Alcantara said. ”I wanted to give 100% for my team and win the game.”

Adam Ottavino (5-2) pitched a scoreless seventh and Trevor Williams followed with a perfect eighth. Edwin Diaz converted his 23rd save, striking out three batters in the ninth on 10 pitches – all strikes.

Diaz nearly had an immaculate inning, but Joey Wendle fouled off an 0-2 pitch before striking out to end it.

”We’re at a point where, for me, every one hurts that we lose,” Marlins manager Don Mattingly said. ”That’s how you feel after these.”

New York tied it 4-all on Marte’s solo homer in the fourth. Marte skirted a 97 mph fastball from Alcantara near his chin and then drove the next pitch over the wall in center for his 11th homer.

”Close pitches are part of the game. After that pitch I smiled and continued to concentrate,” Marte said. ”Then I got a pitch high and outside and was able to connect.”

Wendle grounded into a double play that scored Luke Williams from third and put Miami ahead 4-3 in the second.

Nimmo’s RBI double and Marte’s two-run triple in the second erased a 3-0 deficit.

”Facing Alcantara – what a great pitcher, a lot of respect for him – but we were able to match punch for punch,” Nimmo said. ”I really felt like this game was one, we needed to really take it because to get to a guy like that it means a lot.”

The Marlins scored three in the first on Miguel Rojas’ bases-loaded double off Chris Bassitt, who made his fourth start against the Marlins since June 19. The right-hander gave up four runs, six hits and four walks in six innings.

ROSTER MOVES

The Mets activated outfielder Tyler Naquin, but he didn’t play. Naquin was acquired in a trade with Cincinnati late Thursday.

New York also recalled LHP Sam Clay and RHP Stephen Nogosek from Triple-A Syracuse. LHP David Peterson was optioned to Syracuse, and OF Travis Jankowski was designated for assignment.

The Marlins selected the contracts of INF Charles Leblanc and LHP Jake Fishman from Triple-A Jacksonville and designated INF Willians Astudillo for assignment.

TRAINER’S ROOM

Mets: RHP Drew Smith (strained lat muscle) was placed on the 15-day injured list Thursday.

Marlins: LHP Daniel Castano entered concussion protocol after he was hit in the head by a line drive Thursday in Cincinnati. … LHP Trevor Rogers (low back spasms) was placed on the 15-day injured list, retroactive to Tuesday. … 1B/DH Garrett Cooper (bruised right wrist) worked out with the team.

UP NEXT

Mets RHP Carlos Carrasco (10-4, 4.07 ERA) starts the second game of the series Saturday. Miami had not announced a starter.

More AP MLB coverage: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports