Chasen Shreve, right, bailed out Aroldis Chapman by getting a...

Chasen Shreve, right, bailed out Aroldis Chapman by getting a double play ball and a groundout to end a three-run Mets ninth inning for 7-6 Yankees victory on Saturday, July 21, 2018, at Yankee Stadium. Credit: Jim McIsaac

Chaos was the order of the day at the Subway Series on Saturday.

The first few helpings went to the Mets. Even before the game, the health of slugger Yoenis Cespedes threatened to hang over the team for considerable time and the negotiations to complete the Jeurys Familia trade to Oakland dragged on and left the bullpen taxed. Then in the fourth inning, centerfielder Matt den Dekker made bids for and failed to catch three batted balls in a four-run Yankees rally.

However the final and climactic helping of chaos went to the Yankees when closer Aroldis Chapman entered with a four-run lead, couldn’t get an out and put the tying and go-ahead runs on base. Chasen Shreve got the last three outs for the second save of his big-league career in a 7-6 win before a sellout crowd of 47,102 at the Stadium.

“That’s a huge, huge, huge pick-me-up,” Yankees manager Aaron Boone said of Shreve, who got a Devin Mesoraco double play and Wilmer Flores groundout. “In a perfect world, we actually tried to stay away from Shreve [after] an inning-plus [Friday], but his pitch count was reasonable . . . It was a really good job by Shrever.”

Greg Bird’s RBI single in the sixth, Aaron Judge’s 26th homer in the seventh and Austin Romine’s RBI groundout in the eighth provided the key insurance runs to survive Chapman’s poor outing.

The Yankees have won three of the first five in the season series and can take it with a victory in Sunday’s 8 p.m. finale. It’s Masahiro Tanaka against the Mets’ Jacob deGrom.

Chapman came on with a 7-3 lead. He gave up an infield hit and three walks to the first four Mets he faced, bringing the margin to three runs, then hit Brandon Nimmo to make it 7-5. The Mets scored their last run on Mesoraco’s double play.

Asked if there was a health issue behind the performance, Chapman said: “I feel good. It’s just a bad outing.”

Boone thought it a possible result of six days off and called it “one of those hiccups that happen over the course of a year.”

The Familia trade talks — completed for two prospects and international pool money — forced the Mets to use both Seth Lugo and Robert Gsellman out of the bullpen for 50-plus pitches in Friday’s win and might have made protecting a lead difficult.

On Friday night, Cespedes declared — following his first game after missing nearly 10 weeks to a hip flexor injury — calcifications caused his spate of leg injuries and that he might require surgery that comes with at least an eight-month recovery. He was too sore to play Saturday and Mets manager Mickey Callaway said the outfielder will see team medical personnel and there is a chance he will be day to day for the rest of his season.

The Mets did not make a member of the front office available to clarify whether the team is considering surgery for Cespedes.

Sonny Gray (7-7) allowed three runs (two earned) in 5 1⁄3 innings and quelled none of the urgency for the Yankees to acquire at least one starting pitcher before the July 31 trade deadline.

Mets lefthander Steven Matz (4-8) allowed five runs and nine hits in five-plus innings, his worst outing in a month and among the worst of his season.

Michael Conforto’s solo homer off Gray gave the Mets a lead, but the Yanks scored four times in the fourth, when den Dekker put serious mileage on his cleats. He took a bad route on Didi Gregorius’ one-out drive to the rightfield gap, unsuccessfully dived and it went for an RBI triple. After Miguel Andujar’s shot to right went for a fan-assisted double and a 2-1 lead, Bird hit a drive over den Dekker’s head. It went off his glove on the warning track to score another run. Romine’s two-out flare fell in front of a diving den Dekker for a run-scoring single.

“Initially I thought I had a play, but [Gregorius] hit it real well. The ball by Bird was another one I thought I’d get to, but it was just out of reach,” den Dekker said. “That’s how it goes. Sometimes you make the play and sometimes you don’t.”

Callaway said of the Gregorius triple: “I thought the angle didn’t do him any favors trying to catch that one. And then all the running around I think took its toll, especially on the last one. He was trying to come in on that blooper and didn’t quite get it.”

More Yankees headlines

Newsday LogoYour Island. Your Community. Your News.Digital AccessOnly 25¢for 5 months