HOUSTON (AP) — All season long, it seemed inevitable.

Yankees-Astros for the American League pennant.

“It’s the matchup that we wanted,” Houston shortstop Carlos Correa said. “It’s the matchup that everybody wants to watch. It’s must-see TV right there. So everybody is going to be tuning in. It’s going to be fun.”

Houston made it happen Thursday night as Gerrit Cole pitched another playoff masterpiece and the Astros jumped to a quick lead, turning back the Tampa Bay Rays 6-1 in the deciding Game 5 of their AL Division Series.

On deck, the heavyweight matchup so many fans were anticipating: Jose Altuve and the 107-win Astros against Aaron Judge and the 103-win Yankees. Game 1 is Saturday night in Houston — the Astros won four of seven meetings this season.

“This is two incredible powerhouse teams,” Houston ace Justin Verlander said. “We’ll find ourselves in the middle of the ring here in a couple of days and we’ll be going at it.”

After fellow aces Zack Greinke and Verlander were unable to close out the scrappy Rays on the road, Cole made sure Houston moved on. Given a 4-0 cushion in the first inning, he dominated through the eighth, striking out 10 and allowing just two hits.

“I’m just going to treat it like it’s the next game, man,” said Cole, who grew up a Yankees fan. “I mean, we know that they’re obviously very talented, and it’s going to be a dogfight.”

Michael Brantley and Altuve put the finishing touches on this victory, hitting back-to-back home runs in the eighth. The Astros advanced to their third straight ALCS, and are aiming for their second World Series crown in that span.

Houston beat the Yankees in a seven-game ALCS on the way to its first championship in 2017. The Astros also won the 2015 AL wild-card game at Yankee Stadium.

The Rays beat Oakland in the AL wild-card game, then won Games 3 and 4 against the Astros to extend their first playoff run since 2013.

But facing Cole, the Rays were in trouble — especially after Altuve, Alex Bregman and the Astros scored four times in the first against Tyler Glasnow, who said afterward it was pretty obvious he was tipping pitches.

“You get a taste of this, you want to keep going,” Rays manager Kevin Cash said. “Today we kind of got outpowered. Outpowered on the mound and obviously at the plate.”

Cole followed his 15-strikeout gem in a Game 2 win with another overpowering effort. The right-hander, who was drafted by the Yankees out of high school but didn’t sign, improved to 18-0 in his last 24 starts.

“This team is special, and the reason that we’re special is because different guys step up every single night,” Bregman said. “Yeah, if one guy goes off we’re probably going to win. Gerrit went off twice this series.”

Cole topped the majors with 326 strikeouts this season, led the AL with a 2.50 ERA and posted 20 wins, one behind Verlander for most in the big leagues. He tried to stick to what got him this far and not alter his approach on Thursday night even though the stakes were so much higher.

“You’re not naive to the situation you’re in, but you can’t afford to treat it any different,” he said.

The 29-year-old struck out the first two batters in the eighth before Willy Adames grounded out to end Cole’s night.

“I don’t know if anybody can get better than that,” Adames said. “He was unbelievable last start, and today was still the same.”

Cole beat his chest once before walking to the dugout to a huge ovation from the rowdy sellout crowd of 43,418 at Minute Maid Park.

“Energy was so great all night,” Cole said. “They deserved a hat tip.”

After winning an MLB-best and franchise-record 107 games in the regular season, the Astros were determined not to suffer the same fate as the Dodgers, winners of 106 games, who were ousted from the playoffs by the wild-card Nationals on Wednesday night.

Houston had been outscored 14-4 in the last two games, but looked sharp at home, where it went 60-21 in the regular season.

A day after the Cardinals scored a postseason-record 10 runs in the first inning of a 13-1 win over the Braves, the Astros scored four runs fast. Now it wasn’t nearly as big as what St. Louis did, but after the Astros were shut down at Tropicana Field, it was just as huge for them.

“It shows a lot of character,” Houston general manager Jeff Luhnow said. “Because if we hadn’t gotten up early I think it would have been a different ballgame the way they have their relievers lined up and ready to go. I’m glad it wasn’t a one-run game. Getting four early mattered a lot.”

The Astros will make their seventh appearance in an LCS and are the first team to reach the ALCS three seasons in a row since the Detroit Tigers did it from 2011-13.

Altuve’s shot gave him 11 postseason homers to pass Chase Utley for most all-time by a second baseman.

Cole extended his major league record by striking out at least 10 batters for the 11th straight game, a stretch where he’s fanned 135.

Cole pitched a 1-2-3 third but didn’t strike anyone out in the frame, ending a streak of 73 consecutive innings with at least one strikeout. The streak, which dated back to Aug. 1, was the longest such streak since 1961, besting the second-best stretch by 33 innings.

George Springer and Brantley hit back-to-back singles and Altuve’s single made it 1-0. Bregman’s double, which landed just in front of the bullpen in right-center, scored two more to push the lead to 3-0.

Yuli Gurriel’s groundball single to left field added another. Houston’s five hits and four runs set franchise playoff records for most hits and runs in the first inning.

Eric Sogard hit a solo homer in the Tampa Bay second in his first start in almost a month while dealing with a foot injury. But Tampa Bay managed only a single by Ji-Man Choi in the fourth and a walk by Travis d’Arnaud to start the seventh against Cole.

Roberto Osuna pitched a hitless ninth to finish off the win.

Cash had said he thought Glasnow could throw about 90 pitches in this one, but he’d seen enough of the big right-hander after 40 pitches and lifted him with two outs in the third for Blake Snell.

Snell, the 2018 AL Cy Young Award winner, got the next four outs in his second career relief appearance after getting the save in Game 4. The Rays wound up using nine pitchers.

UP NEXT

Greinke, who took the loss in Game 3, is likely to start for Houston in Game 1 of the ALCS.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports