NEW YORK — Sandy Alcantara extended his shutout streak to 19 innings and pinch-runner Billy Hamilton scored on a throwing error by catcher Tomás Nido in the 10th, sending the Miami Marlins past the New York Mets 2-0 on Sunday.

Luke Williams added an RBI single for the Marlins, who won for the eighth time in 11 games and earned a split of the four-game series. Tanner Scott struck out Francisco Lindor with runners at the corners for his 12th save.

New York’s lead in the NL East was trimmed to 1 1/2 games over the defending World Series champion Atlanta Braves — its smallest since April 16. The Mets, who had a 10 1/2-game cushion on June 1, begin a three-game series at Atlanta on Monday night.

Alcantara, selected to his second NL All-Star team Sunday, allowed six hits in seven innings and lowered his ERA to 1.73 — third-best in the majors. He struck out four and walked one.

“It was probably one of his best performances, from the standpoint that he wasn’t clicking with all his stuff,” Marlins manager Don Mattingly said. “But I think him and (catcher Jacob Stallings) did a nice job of using his stuff and getting through it.”

The right-hander has pitched at least seven innings in each of his last 12 starts, the longest stretch for a Marlins pitcher since 2004.

“When you believe in your stuff, you don’t have to worry,” Alcantara said. “You just go and compete no matter what happens.”

Jon Berti had three hits for the second straight game and got his major league-leading 27th stolen base for Miami.

Hamilton was inserted as the automatic runner at second base in the 10th, replacing Garrett Cooper. With a 1-2 count on Jesús Aguilar, the speedy Hamilton took off and easily stole third. He scored when Nido’s throw sailed well over Eduardo Escobar’s head into left field.

“The faster I get to third base, the easier it is for all those guys to hit,” Hamilton said.

Nido scored the winning run Saturday in the 10th inning on a throwing error by Scott.

“It is always good to get a guy back out there and let him compete again the next night,” Mattingly said of his closer.

Jesús Sánchez and Bryan De La Cruz singled off Tommy Hunter (0-1) before Williams’ single made it 2-0.

Richard Bleier (1-1) worked a hitless ninth for the win.

Taijuan Walker turned in his sixth straight quality start for the Mets. The big right-hander scattered three hits over seven scoreless innings and struck out seven.

“I said before the game, in order to compete with a starter like that, you’ve got to get a good start out of your starter, and we certainly did. He matched him,” Mets manager Buck Showalter said. “That was fun to watch. He knows what’s going on and what’s required to compete in a game like that.”

Luis Guillorme had three of New York’s seven hits.

Trainer’s room

Marlins: SS Miguel Rojas collided with Berti in left field on Lindor’s fourth-inning popup. Rojas dropped to a knee after making the catch. He was checked by Mattingly and an athletic trainer but initially remained in the game before exiting in the sixth with neck stiffness.

Mets: C James McCann (left oblique) was placed on the 10-day injured list. He was injured Saturday making a sweep tag at the plate. … RF Starling Marte (left groin tightness) sat out and is day-to-day. Showalter said he expects to get Marte back “in the near future.”

Extra! Extra!

The Mets fell to 7-1 in extra innings this season, snapping a streak of eight straight extra-inning wins that dated back to Sept. 14, 2021. That was the longest streak for the team since 1997.

Up next

Marlins: LHP Trevor Rogers (4-7, 5.57 ERA) pitches Monday night in the opener of a three-game home series against Pittsburgh. Rogers, who finished second in 2021 NL Rookie of the Year voting, has completed six innings only once in 16 starts this season.

Mets: RHP Max Scherzer (5-1, 2.26 ERA) makes his second start since returning from an oblique injury. He struck out a season-high 11 in six shutout innings of two-hit ball Tuesday at Cincinnati. Braves LHP Max Fried (9-2, 2.52) has allowed two earned runs or less in eight of his last nine starts.