Just before Juan Soto could play the villain, Francisco Lindor did it for him.

With the bases loaded and one out in the top of the ninth — and Soto looming on deck — Lindor hit a fly ball just deep enough for a sacrifice fly that scored Luisangel Acuña to lift the Mets to a tense 3-2 win over the Yankees on Saturday afternoon in The Bronx.

Edwin Díaz then retired pinch-hitter Austin Wells, Ben Rice and Aaron Judge in the bottom of the ninth to seal it.

Francisco Lindor hit the game-winning sac fly in the ninth inning on Saturday. Jason Szenes / New York Post

Edwin Díaz struck out Aaron Judge to close out the game. Jason Szenes / New York Post

The Mets celebrate their win over the Yankees on Saturday. Jason Szenes / New York Post

Judge worked a full-count with the sellout crowd of 47,510 on its feet, but Díaz got him to chase an elevated 99 mph fastball to finish the day 0-for-5 – only the third time this season he did not reach base.

Fernando Cruz got himself into trouble in the top of the ninth by walking Luis Torrens with one out, with Acuña pinch-running for the catcher at first base.

Aaron Judge went down swinging to end the game. Robert Sabo for NY Post

Brett Baty then hit a ground ball to the left of DJ LeMahieu, who made a diving stop on it but could not get a handle on the ball to get off a throw.

Cruz then hit No. 9 hitter Tyrone Taylor with an errant sinker to load the bases for Lindor.

The late drama set up a rubber game showdown on Sunday night between Max Fried and David Peterson.

Clarke Schmidt and Griffin Canning engaged in pitchers’ duel — Schmidt lasting six-plus innings and Canning tossing 5 1/3 — with both exiting in a 2-2 game.

Pete Alonso delivers an RBI single for the Mets against the Yankees on May 17, 2025. Jason Szenes / New York Post

LeMahieu and Cody Bellinger drilled solo homers off Canning while the Mets got to Schmidt for both runs in the fourth inning that could have gone off the rails more than it did.

The Yankees used some sharp defense to keep the game tied in the top of the seventh.

Brett Baty was on first with one out when Taylor shot a double to left-center field off Mark Leiter Jr., just out of the reach of Jasson Domínguez.

Jasson Domínguez is tagged out at home after a throw from Pete Alonso. Jason Szenes / New York Post

Francisco Lindor, who also hit the winning sacrifice fly, scores a run earlier in the game Jason Szenes / New York Post

The ball then bounced off the wall and over Domínguez’s head, but Bellinger was right there to grab it and begin a relay to Anthony Volpe, who fired home to J.C. Escarra to nail Baty.

Francisco Lindor came up next and hit a ground ball up the middle, but LeMahieu made a sliding stop on it, quickly got to his feet and unleashed a throw to first for the out.

It was a throwback game for LeMahieu, who gave the Yankees a 1-0 lead in the third inning when he took Canning’s inside fastball the other way for his first home run since July 31 of last year.

Brett Baty (7) gets thrown out at home trying to score in the seventh inning. Robert Sabo for NY Post

Making just his second start of the season after returning from the IL for a calf strain, LeMahieu also smoked a single up the middle at 100.5 mph off his bat while going 2-for-4, drilling the ball in all four at-bats.

LeMahieu nearly played hero in the eighth, coming up with the bases loaded and two outs and smoking a line drive off the bat at 106.6 mph against Reed Garrett.

But it was hit too hard and right at Soto, who caught it for the third out.

Schmidt retired the first nine batters he faced on 27 pitches before getting derailed in a 25-pitch fourth inning that he was lucky was not worse.

Cody Bellinger celebrates his game-tying homer. Jason Szenes / New York Post

It began with a four-pitch walk to Lindor before Soto and Pete Alonso delivered back-to-back singles that tied the game at one. 

One out later, Soto got a huge jump off Schmidt to steal third, setting him up to score on Mark Vientos’ sacrifice fly that put the Mets ahead 2-1.

Schmidt went on to load the bases with back-to-back walks to Jeff McNeil and Luis Torrens, but he got Baty to fly out to the warning track to escape the jam.

Juan Soto of the New York Mets in right field during the first inning. Jason Szenes / New York Post

Schmidt went on to last six innings, though tied a career-high with five walks.

The Yankees had a chance to tie the game or more in the bottom of the fifth, when they had runners on first and second with no outs.

But Jorbit Vivas, instead of trying to move the runners over with a sacrifice bunt, struck out before Ben Rice lined out to left and Aaron Judge grounded out to end the threat.

New York Yankees pitcher Clarke Schmidt throwing a pitch against the New York Mets. Brad Penner-Imagn Images

Griffin Canning #46 of the New York Mets throws a pitch during the first inning. Jason Szenes / New York Post

But Bellinger did the trick with one swing leading off the bottom of the sixth, crushing a 432-foot homer into the Yankees bullpen off Canning that tied the game.

It also extended Bellinger’s hitting streak to 12 games, with his bat coming alive after a slow start.