Yankees closing pitcher Jonathan Loaisiga, left, and catcher Gary Sanchez,...

Yankees closing pitcher Jonathan Loaisiga, left, and catcher Gary Sanchez, right, celebrate the team's 4-0 win over Astros on Friday in Houston. Credit: AP/Michael Wyke

HOUSTON — Nestor Cortes Jr. didn’t receive the win Friday night. That’s because he fell one out short of the five innings required of a starter.

But good luck convincing anyone wearing the road grays at Minute Maid Park that the soft-throwing lefthander wasn’t the most responsible for the Yankees’ 4-0 victory over the Astros in front of 40,857.

"I’m sure he’ll be upset with me for not getting him the win," Aaron Boone said with a smile. "But he gave us more than we could have hoped."

Cortes, brilliant since the Yankees added him to the 26-man roster May 30 in a barely noticed transaction, only burnished that adjective with his performance.

With the Yankees facing the offense-loaded, AL West-leading Astros at Minute Maid for the first time since Jose Altuve hit a walk-off homer off Aroldis Chapman in Game 6 of the 2019 ALCS, Cortes allowed two hits and two walks in 4 2⁄3 innings and lowered his ERA to 1.05 in nine games (two starts).

"I think my stuff has gotten a little better," Cortes said. "My command has gotten a lot better, too, so I think that’s what’s working for me most. A lot of people think I’m a crafty lefty, which I am to a certain point, but I think my pitches have gotten a little crisper."

Aaron Boone replaced Cortes with an even softer-tossing lefthander, Lucas Luetge, with two outs in the fifth. The Astros fared no better against him, producing exactly zero hard contact in 1 1⁄3 innings. Chad Green, who earned the save Wednesday night against the Mariners in place of Chapman, allowed a hit in two innings before Jonathan Loaisiga pitched a perfect ninth.

The Yankees have won four of their last five games. The Astros had only five baserunners, including two doubles by Kyle Tucker, and were outhit 12-3.

The Yankees received a two-out, two-run double by Brett Gardner in the fourth and a two-run double by DJ LeMahieu in the seventh, with an opposite-field ground-ball double by Tyler Wade against the shift setting up LeMahieu’s hit. On the 10th pitch of his at-bat, LeMahieu lined a hanging slider off the bottom of the leftfield wall.

"I had a couple really good at-bats [by Gardner and Wade] before me and I’m just trying to follow that up and keep the line moving," LeMahieu said. "Threw me some good pitches and just put a good swing on one."

The Yankees (45-42), who took two of three in Seattle before arriving here, can make it two series wins in a row before the break behind struggling ace Gerrit Cole on Saturday night.

The Yankees improved to 3-1 against the Astros (54-35) this season. The clubs’ first meeting, May 4-6 at the Stadium, was memorable because of the unrelenting vitriol directed at the Astros as a result of the illegal sign-stealing they engaged in, and were punished for by MLB, in 2017-18.

Jose Altuve was on the receiving end of the vast majority of that hostility. Friday night’s sellout crowd did its best to exact some degree of revenge, booing Aaron Judge, who finished second to Altuve in the AL MVP voting in 2017, each time he strode to the plate. Truth be told, the volume of it didn’t come close to approaching what Judge hears on a regular basis at Fenway Park.

"Obviously, you can’t help but think about the past sometimes," Gardner said of the recent history against the Astros. "But this is a new season, a new group of guys and, obviously, our mission is to find a way to get back in this thing and play good baseball and try to get back in contention to make it to the postseason . . .

"From time to time, you can’t help but think about the past, [but] you’ve got to be able to, when the time comes, when the time is right, you’ve got to be able to block that out and focus on the task at hand, which is just this game today, these nine innings, and I thought overall we did a good job of that."

More Yankees headlines

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months