After leading the majors with a .294 batting average with runners in scoring position during the regular season, the Yankees struggled mightily in that important department against the Astros in the ALCS, but that started to change a little bit on Friday night.

Before the Yankees’ 4-1 Game 5 win over the Astros at the Stadium, the Bombers were hitting .148 (4-for-27) with runners in scoring position and were hitless in their previous 14 at-bats in the clutch. They went 1-for-2, including an Aaron Hicks three-run homer Friday.

“That’s baseball. Bottom line is, you’re going to fail more in those situations anyway, and then a small sample against a really good team, it can vary one way or the other real easily,’’ Aaron Boone said of his club’s struggles. “So it needs to turn probably if we’re going to have success, right? But, I mean, this is ultimately a lot of times what the postseasons come down to, right? The teams that are able to move on and get big hits. We need to flip that script here.’’

The Yankees’ bats weren’t just frigid in the clutch. In the previous four games of the ALCS, the Yankees hit .204 overall — one of the biggest reasons they were in a 3-1 ditch and facing elimination after winning Game 1, 7-0.

Since that win, the Yankees had scored a total of six runs and not more than three in a game until Friday night.

On the other side of the ledger, Yankees pitchers were outstanding facing batters with runners in scoring position in postseason series against the Twins and Astros. Opposing hitters entered Game 5 with a .115 (7-for-61) average in the clutch, and the Astros were 0-for-6 on Friday.

On Thursday night, Gleyber Torres, batted cleanup in Game 4 and had his 10-game hitting streak stopped with an 0-for-5 outing that included two fielding errors. Torres was moved from fourth to third against Justin Verlander in Game 5 and went 1-for-3 with a double.

CC Sabathia’s roster spot was taken by right-handed reliever Ben Heller, who had been working out in Tampa in case an injury surfaced.

Heller, who missed all of 2018 because of Tommy John surgery, appeared in six games for the Yankees this season. He struck out nine, walked three and gave up six hits in 7 ¹/₃ innings.