Yankees Mark Leiter Jr (38) pitches during Game 4 of...

Yankees Mark Leiter Jr (38) pitches during Game 4 of the American League Championship Series against the Guardians at Progressive Field in Cleveland on Oct. 18, 2024 Credit: Newsday/William Perlman

CLEVELAND —  The text message arrived a little after midnight on Saturday following the Yankees’ 8-6 victory over the Guardians on Friday night in Game 4 of the ALCS at Progressive Field.

It was from Mark Leiter Sr. — the former Yankees pitcher and father of Mark Leiter Jr., the winning pitcher on Friday, who turned in a gutty performance on the same day he found out he was being added to the ALCS roster because of an injury to Ian Hamilton.

“That was big,” the proud father wrote to Newsday. “Wow. Perseverance, perseverance. He kept his head up, keeps working hard, knowing the opportunity will arise, and I better be ready when it does, and that’s exactly what he went out and did today. Hasn’t pitched in three weeks and he’s out there in that spot? That’s a winner. Says a lot about him.”

Mark Leiter Jr. had not pitched since Sept. 29. On Friday, he went 1 2⁄3 innings, allowing one run (only because of his own defensive mistake). Leiter was hailed as the star of the night by teammates such as Tommy Kahnle, who earned the save in the ninth as the Yankees moved to within one victory of their first World Series berth since they won it all in 2009.

“Tremendous — I’ve got not many words that can describe what he did for us today,” Kahnle said. “That’s huge. I applaud him big-time.”

Nestor Cortes, who is close to being ready after a forearm injury and also was considered for the spot that went to Leiter, told Newsday: “In the postseason, there’s always an unsung hero. Tonight, it was him.”

Here was the situation: The Yankees were coming off a bullpen meltdown in Cleveland’s 7-5, 10-inning victory in Game 3 on Thursday night.

Jhonkensy Noel hit a two-run homer off Luke Weaver with two outs in the ninth to tie the score. David Fry hit a two-run homer off Clay Holmes with two outs in the 10th to give the Guardians an epic 7-5 victory.

It seemed to be happening again in Game 4.

The Yankees had built a 6-2 lead mostly on the strength of a two-run homer by Juan Soto in the first and a three-run shot by Giancarlo Stanton in the sixth.

With starter Luis Gil having gone four innings, after Stanton’s blast, the Yankees needed to get 12 outs to take a 3-1 series lead.

“Still had a long way to go to the finish line,” manager Aaron Boone said. “I wasn’t quite sure how we were going to get there.”

The never-say-die Guardians got to within 6-5 in a three-run seventh against Jake Cousins and a weary Clay Holmes (eighth appearance in eight postseason games).

With the tying run on second and one out, Boone called on Leiter, who was not on the ALDS roster and was added to the ALCS roster on Friday only because of a calf injury Hamilton suffered on Thursday.

“Booney kept telling me be ready for anything,” Leiter said. “That there was a chance that I was going to be used to get big outs. And that’s the way it kind of fell.”

Leiter got to immediately face Noel, the 6-3, 250-pound outfielder nicknamed “Big Christmas.”

Noel gave the Yankees a big scare with a fly ball to the wall in the leftfield corner that got the sellout crowd on its feet but ended up in the glove of Alex Verdugo.

Leiter then struck out Andres Gimenez to send the game to the eighth with the Yankees holding a one-run lead.

Still, it wasn’t over yet. Bo Naylor led off the eighth against Leiter with a double and moved to third on a grounder to short.

With the infield in, Leiter got Steven Kwan to pop to second for the second out. Then the unthinkable happened.

Fry hit a comebacker to Leiter’s left. Leiter booted it, kicked it and then shoveled it from the first-base line to Anthony Rizzo. But Leiter was so close to Rizzo that it handcuffed the first baseman and went past him as the tying run scored.

It was very questionably scored an RBI single with an error on Leiter tacked on for allowing Fry to take second.

After an intentional walk to Jose Ramirez, Leiter recovered to strike out Josh Naylor to end the inning.

When the Yankees scored two in the ninth off closer Emmanuel Clase, Leiter was in line for the win. He got it when Kahnle got Brayan Rocchio on a grounder to second with two men on to end it.

It was Kahnle’s 10th career save, including two in the postseason, both against Cleveland (also Game 4 of the 2017 ALDS).

Jon Berti, who had just entered the game as a pinch runner in the top of the ninth, bobbled the ball — of course he did in this crazy game — before recovering to throw to first for the final out.

Leiter, who threw 24 pitches, said he’ll be ready for Saturday night’s potential clincher.

Why not? He proved on Friday that he’s ready for anything.