HOUSTON — The Houston Astros were running out of chances, energy, warm bodies and life late Saturday night, in their third game in three days, in their second city and second time zone in 24 hours, near the end of the third week of the postseason and deep into their seventh straight month of playing baseball together. And somewhere deep down, they understood time was running out, too. Win or lose, there would be a tomorrow. But tomorrow’s tomorrow was no given.

But what they had, even at their most dire moment, was José Altuve. And what Altuve had was a bat. And what that bat had in it was one more mighty swing. In the bottom of the ninth inning Saturday night, in Game 6 of the American League Championship Series, it propelled a slider from Aroldis Chapman, the New York Yankees’ flamethrowing closer, high over the wall in left — a no-doubt, two-run, walk-off homer that ended the ALCS and put the Astros into the World Series against the Washington Nationals.

They will soon raise another AL pennant in Houston, the second in three years, after the Astros’ dramatic 6-4 victory in Game 6 of the ALCS, which saw them end the Yankees’ season for the third time in five years. Altuve’s homer set off a wild celebration at Minute Maid Park, with the Astros spilling out of their dugout, fireworks and confetti filling the air and a crowd of 43,357 losing its collective mind.

Just a half-inning earlier, the Astros, two outs from clinching, had watched a 4-2 lead evaporate on a two-run homer by Yankees first baseman DJ LeMahieu off closer Roberto Osuna. LeMahieu battled for 10 pitches, fouling off four straight two-strike offerings, before launching his drive to right, which landed in the front row of seats, just out of reach of George Springer’s glove. The blast had Astros players doubled over in anguish and the ecstatic Yankees on the top step of their dugout.

But it was Springer who, in the bottom of the ninth, drew the two-out walk off Chapman to set the stage for Altuve. Facing Chapman, who hadn’t allowed a run to that point in 4 ⅔ innings this postseason, Altuve took two fastballs for balls, took a slider for a strike, then unloaded on a 2-1 slider that hung up in the zone.

“The playoff version of him,” Astros Manager A.J. Hinch said of Altuve, “is spectacular.”

Minutes after the blast, amid all the chaos, Altuve was wandering the infield, a commemorative World Series 2019 cap on his head, pieces of confetti stuck to his sweaty face, looking for his family. Finally, he spotted his two-year-old daughter, Melanie, running toward him. As his face lit up, he scooped her into his arms — and after a hug and a kiss, she immediately began picking the confetti off her father’s face.

“We’re going to the World Series. . . . We’re all celebrating right now,” Altuve said. “We’re not thinking about tomorrow until it comes.”

The Astros are loaded with high-end talent and blessed with ample creativity and resolve — but after the high-wire act they pulled off with their pitching in Game 6, a designated “bullpen” day that stretched their resources to the brink, they were also in desperate need of a day off.

They will essentially get two of them, thanks to Altuve, avoiding a Game 7 on Sunday night and pointing instead toward Game 1 of the World Series against the Nationals on Tuesday night at Minute Maid Park, where they will have ace Gerrit Cole, well-rested and hard-throwing, on the mound.

“To be able to take these next two days, not have to travel, to rest, get our guys ready, because we haven’t faced the Nationals, [and] we don’t know much about them — now we have a couple days to prepare,” Astros General Manager Jeff Luhnow said. “And to have Cole on full rest, ready to go in Game 1 and [Justin] Verlander, rested and ready to go in Game 2, it’s exactly what we were hoping for.”

There is a sense the Astros, particular their hitters, still haven’t played their best baseball this month. They are scoring just 3.7 runs per game, and their team OPS (on-base plus slugging) of .645 is more than 200 points below their major-league-leading mark during the regular season. Josh Reddick is hitting just .136, Springer .152, Carlos Correa .171, Yordan Alvarez .171, Yuli Gurriel .209 and Alex Bregman .257. That’s two-thirds of their regular lineup, slumping.

Game 6 nearly turned into a worst-case scenario for the Astros after LeMahieu’s game-tying homer in the ninth. Having led the entire game, they were suddenly in both an emotional hole and a personnel one. They had blown through all the best arms in their bullpen to try to carry their thin lead home, while the Yankees, now in a tie game, still had their closer, Chapman, ready in theirs.

The game had reached a fairly conventional juncture — with both teams deploying their closers in a high-leverage ninth inning — by a very unconventional path. Pushed by a rainout Wednesday night in New York that had altered pitching schedules and wiped out Friday’s scheduled travel day, both the Astros and Yankees opted against using a weaker fourth starter, turning instead to their bullpens to try to piece together 27 outs.

It was a jarring sight given the stakes. It was also, if we’re being honest, kind of fun.

On a 1-to-10 scale of organized chaos, where one is the running of the bulls in Pamplona and 10 is a 3-year-old’s birthday party at Chuck E. Cheese, a double-bullpen game on the second weekend of a League Championship Series is something like a six. Unofficial press box oddsmakers put the over-under on the time-of-game at four hours (it was 4:09), the over-under on pitching changes at 12.5 (there were 12).

By the bottom of the first, the Astros had a 3-0 lead, courtesy of Gurriel’s three-run homer off Yankees “opener” Chad Green. By the top of the second, the Yankees had brought the go-ahead run to the plate. By the bottom of the second, both teams were on their second pitchers of the night. By the top of the third, the Yankees had put the go-ahead run on base, and the game was visited by its fifth pitcher. And on and on it went.

To understand how two exceptional teams, winners of 210 regular season games and payroll-spenders of nearly $400 million between them, with Cy Young winners, multiyear all-stars and future Hall of Famers populating their pitching staffs, wound up with a pair of solid but unheralded relief pitchers starting for them in Game 6 of the ALCS, you must begin with the rise of the opener as a pitching strategy beginning with the Tampa Bay Rays in 2018 — and its subsequent spread across the game.

You must recall, as well, that both teams lost their presumptive No. 4 starters down the stretch — the Astros’ Wade Miley to acute underperformance and the Yankees’ Domingo German to a domestic violence suspension.

And so, Game 6 began at 7:09 p.m. Houston time with Brad Peacock, who had closed out Game 5 for the Astros, on the mound, thus making him the first pitcher since Firpo Marberry of the 1924 Washington Senators to start a playoff game the day after finishing one.

In a game such as this, the managers are bound to have a larger say in the outcome than is typical. New York’s Aaron Boone and Hinch sequenced their pitching with a fluid combination of scripted preferences and on-the-fly reaction. The Astros suffered a setback in the top of the third when Ryan Pressly, at his best a high-leverage monster with an unhittable curveball, suffered a knee injury while fielding a comebacker that stranded the bases loaded. His status for the World Series is unclear.

The Astros spent most of the game trying to protect a slim lead, aided in that mission by a pair of dazzling, diving catches by corner outfielders Reddick in the sixth and Michael Brantley in the seventh. The latter was especially impressive, as it included not only a full-bore, all-out dive to snag Aaron Hicks’s sinking liner, but also a strong throw to first base to double up Aaron Judge, who was trying desperately to get back to the bag.

The Yankees will lament those lost chances, and perhaps the run they conceded in the bottom of the sixth — which pushed the Astros’ lead to 4-2 — by not playing their infield in with runners on the corners, one out and Bregman at the plate, allowing the run to score on a force out when Bregman beat the throw to first.

“The ultimate pain you can feel in sports,” Boone said of Altuve’s walk-off gut-punch. “Just to know how good a club we have, to get back into [the game], and then to end it that way — it’s hard, and our guys are hurting.”

A hundred years ago, the Yankees reached the end of the 1910s without a World Series appearance. On Dec. 26, 1919, they purchased a spindly-legged pitcher-turned-outfielder named Babe Ruth for $100,000 from the Boston Red Sox, won three championships behind him in the 1920s and never again endured a decade without at least getting to the final series — until the decade that comes to a close later this month.

Over the course of their 103-win 2019 season, the Yankees rarely came up against a team that was better. But over six games in this ALCS, and especially there at the very end, it became clear that they finally had — if only by the smallest of margins, a single Altuve.

Read more on baseball: