The New York Mets are still in first place — barely.

Once ahead by 10 1/2 games in the National League East, the Mets open a three-game series against the host Miami Marlins on Friday night clinging to a half-game edge.

While the Marlins (56-80) have been out of playoff contention for months, the Mets (87-51) have played consistently superb baseball all year.

Still, the reigning World Series champion Atlanta Braves have made a charge, pulling level with the Mets through Tuesday’s action. New York regained its sole position on top by sweeping the host Pittsburgh Pirates in a doubleheader on Wednesday while the Braves were earning a single win over the host Oakland A’s.

Both New York and Atlanta were idle on Thursday.

The Mets’ players and coaches know they can’t afford a letdown because the Braves — who are on a seven-game winning streak — have been relentless.

“It’s going to be a tight race, and it should be,” Mets shortstop Francisco Lindor said. “The Braves are a good team.”

Still, the Mets have held first place on their own every day of the season except for two — after the games of April 11, when they were 4-5 and a half-game back, and after Tuesday’s games.

The Mets showed what they are capable of last week when they took two of three games from the Los Angeles Dodgers, who have the best record in the majors.

Since then, however, New York has slumped against two last-place teams, going 3-3 vs. the Washington Nationals and the Pittsburgh Pirates.

The Mets, who rank fifth in the majors in runs scored, are led on offense by Pete Alonso, who has 32 homers and 106 RBIs. Lindor is second on the team in homers (21) and RBIs (89), and he drove in three in New York’s 10-0 rout of Pittsburgh in the second game of the Wednesday doubleheader.

The Mets should have a well-rested bullpen for the Friday game following a day off.

Left-hander David Peterson (7-3, 3.32 ERA) will start against the Marlins, a team he has dominated. He is 2-0 with a 2.08 ERA in three career starts against the Marlins, including a 1-0 record with a 1.46 ERA in two starts vs. Miami this year.

Meanwhile, the Marlins will enter the series opener with a sense of relief.

Miami scored two runs in the ninth inning on Thursday night to beat the host Philadelphia Phillies 6-5 and snap a nine-game losing streak. It had been the longest active skid in the majors, and it was the Marlins’ worst stretch of the season.

“We’ve played a lot of close games, and things haven’t been going our way,” Marlins manager Don Mattingly said after the Thursday victory. “It’s nice to win one.”

The Marlins’ biggest problem has been offense, as they rank 27th out of 30 major league teams in runs scored.

On Friday, the Marlins will start impressive rookie right-hander Edward Cabrera (4-2, 2.39). He has allowed more than one run in just two of his nine starts this year. Most recently, he limited the Braves to a run on four hits in five innings during a no-decision on Saturday.

Cabrera has yet to face the Mets this year. In three starts against New York last year, however, he went 0-1 with an 8.68 ERA.

–Field Level Media