October 16, 2020 | 1:31am

When the Yankees tried to beat the Rays at their own game, it blew up in their face during the ALDS.

On Thursday, the Astros were able to do it in Game 5 of the ALCS, using seven pitchers — none for longer than two innings — in their 4-3 win over Tampa Bay to stay alive in the series.

Houston manager Dusty Baker went with five straight rookie pitchers to begin the game and they were good enough to hold down Tampa Bay until Carlos Correa’s game-winning homer in the bottom of the ninth.

“They did the job,’’ Baker said of his young relievers. “We’ve got a bunch of rookies playing like veterans.”

It started with Luis Garcia, who had started one game in the majors before Thursday.

He took the mound at Petco Park in San Diego and tossed two scoreless innings, getting out of a bases-loaded, two-out jam in the second when Mike Zunino sent a fly ball to the track in right.

Astros
Pitcher Luis Garcia gets a talk from pitching coach Brent Strom (r.).Getty Images

Left-hander Blake Taylor allowed a homer to Brandon Lowe to open the third before Enoli Paredes finished the inning.

Paredes pitched into the fifth and became the latest pitcher to allow a homer to Tampa Bay’s Randy Arozarena before Baker went to Andre Scrubb, who got out of the fifth and tossed 1 ¹/₃ scoreless innings.

Brooks Raley, not a typical rookie after making his MLB debut in 2012 with the Cubs before playing in South Korea for most of the next five years, threw a shutout inning.

In all, the rookies allowed just two runs in 6 ²/₃ innings before the veteran Josh James gave up a game-tying homer to Ji-Man Choi in the eighth.

“All I know is they’re fearless,’’ said Ryan Pressly, who earned the win by finishing the game with 1 ¹/₃ scoreless innings. “To watch them go out there and see where they were at the beginning of the year and where they are right now, I’m impressed with how composed they’ve kept themselves this series.”

And they did it better than the Rays, who came up with the concept of the opener in the first place.

“They’ve got the same amount of men [on the roster], but it seems like they’ve got more men than you because they’ve got a lot of interchangeable parts and are used to using them,” Baker said before Game 5.

They used the strategy Thursday, with John Curtiss starting the game, followed by Josh Fleming, in a familiar bulk role. Fleming, though, gave up a two-run single to Michael Brantley in the third.

The Rays fought their way back in the game before one of their most reliable relievers, Nick Anderson, gave up the game-winning homer to Correa in the bottom of the ninth.