Jose Altuve smashed a homer and Yordan Alvarez drove in two runs to lead the defending champion Houston Astros over the Texas Rangers 8-5 on Wednesday in the Major League Baseball playoffs.

Mauricio Dubon had three hits and Martin Maldonado drove in two runs for triumphant Houston, but the Rangers still lead the best-of-seven American League Championship Series 2-1 and will host game four on Thursday and game five on Friday.

“It was a must win for us,” Altuve said. “We had no choice. We had to win this one.”

“Tomorrow, same mentality. One game at a time. One batter at a time — and I think we can make it happen.”

Meanwhile, Philadelphia leads Arizona 2-0 in the National League Championship Series, which continues on Thursday in Phoenix after a travel day.

The Astros, in the ALCS for a seventh consecutive season, captured their 17th victory in their past 20 road games, including sweeping a regular-season series last month against the Rangers.

“I don’t really have an answer for that,” Altuve said of Houston’s success at Texas. “But I can tell you it’s a big win for us.”

Rangers starting pitcher Max Scherzer, obtained from the New York Mets at the MLB trade deadline, had been out since September 13 with a strained right shoulder muscle.

The 39-year-old US right-hander, a three-time Cy Young Award winner for best pitcher, won a World Series title with Washington in 2019 by beating the Astros, but he struggled from the start in game three.

Houston struck first in the second inning when Alvarez was hit by a Scherzer pitch, took second on a Kyle Tucker walk, reached third on Dubon’s single and scored on a two-out wild pitch by Scherzer.

Maldonado followed with a two-run single to left field and the Astros grabbed a 3-0 lead.

Altuve blasted his 25th career playoff homer over the left-field wall in the third inning to boost it to 4-0.

The margin grew to 5-0 in the fourth when Jose Abreu doubled, took third base on a Tucker ground out and scored on a Dubon single.

Astros starter Cristian Javier pitched 4 2/3 no-hit innings but the 26-year-old Dominican right-hander was tagged for a single by Nathaniel Lowe followed by a two-run homer by Josh Jung to lift Texas to 5-2.

“His concentration and focus, his execution on every pitch, he showed up tonight,” Altuve said of Javier. “He gave us a big opportunity to win.”

Texas outfielder Leody Taveras stole a homer from Alvarez with a leaping catch over the centerfield wall in the sixth inning.

But Houston’s Michael Brantley made a lunging grab for a fly out to rob the Rangers’ Adolis Garcia of a run-scoring hit in the sixth as well.

Alvarez smacked a bases-loaded single off Texas reliever Will Smith to drive in two runs for Houston in the seventh for a 7-2 advantage.

Two homers for Jung

The Rangers, two wins shy of their first World Series since 2011, answered in the bottom of the seventh when Lowe singled and Jung followed with his second two-run homer, his blast to centerfield off reliever Hector Neris pulling Texas within 7-4.

Houston responded again in the eighth when Tucker walked, took third on a Dubon single and scored on Jeremy Pena’s single to right field.

Texas pulled within 8-5 in the eighth when Marcus Semien walked, took second on an Evan Carter ground out and scored on a Garcia single.

Alvarez singled in the ninth and tried to score on a Tucker double but was thrown out at home plate.

In the ninth, Houston closer Ryan Pressly walked Mitch Garver but struck out Lowe and got Jung to ground into a game-ending double play.