BOSTON — The Boston Red Sox stumbled on their way to an AL East title — and got a pretty scary look at what’s waiting for them if they get there.

Major league batting leader Jose Altuve had three of Houston’s 17 hits, Carlos Correa had four and the Astros chased Red Sox starter Eduardo Rodriguez in the second inning on Thursday night to win 12-2 and keep Boston from clinching the division title.

“We ran into a buzz saw tonight,” Red Sox manager John Farrell said.

If the standings don’t change, the Red Sox and AL West champion Astros would meet in the ALDS. The Red Sox were guaranteed no worse than a tie for the division title when the Yankees lost 9-6 to Tampa Bay, lowering Boston’s magic number to one.

“I’m pretty sure we’ll see them again,” Houston third baseman Alex Bregman said. “Now we’ve seen them once.”

Boston needs one more win or Yankees loss to clinch the first back-to-back division titles in franchise history; otherwise, the teams would meet in a one-game tie-breaker in New York on Monday to see who needs to play in the wild-card game and who advances to the AL Division Series.

“The sooner the better,” Farrell said. “But still we’re not taking anything for granted.”

Altuve had two singles and his 39th double to raise his batting average to .350. Brad Peacock (13-2) allowed two runs and four hits in five innings, striking out two and walking one as he tried to convince manager A.J. Hinch that he deserves a spot in the postseason rotation.

“I’m sure they’ll tell me something in the next couple of days,” said Peacock, who is fighting to join the staff that will include Justin Verlander and Dallas Keuchel and potentially Collin McHugh, Charlie Morton and Lance McCullers. “They’ve got six good starters to choose from.”

Marwin Gonzalez hit a three-run double in the first inning, and Alex Bregman hit a two-run homer off Rodriguez (6-7) in the second. Correa had an RBI double in the fourth, when the Astros scored four runs, and added a two-run homer in the seventh. Brian McCann also homered for Houston.

Mitch Moreland homered for Boston.

The Astros had already clinched the AL West title. They remain one game behind the Cleveland Indians in the chase for the best record in the league and home-field advantage through the AL Championship Series.

QUICK WORK

Rodriguez got in trouble early, loading the bases with one out in the first on a walk and two singles. After Evan Gattis struck out looking, Gonzalez hit a bases-clearing double into the right-center gap.

Rodriguez got the first two outs of the second before George Springer singled and Bregman hit an 0-2 pitch out to make it 5-0. After a visit by the pitching coach, the Red Sox left-hander walked Correa and that was it. In all Rodriguez allowed five runs, six hits and two walks in 1 2/3 innings, striking out two.

“We’ve got to lead the way from the mound,” Farrell said.

TRAINER’S ROOM

Astros: RF Josh Reddick (sore back) missed his fourth straight game. He had been expected to return on Thursday night, but Hinch said Reddick felt sore after the flight to Boston. “Any semblance of soreness or tentativeness on his part, and he’s just not going to play. It’s not worth it for one game until the soreness is gone,” Hinch said.

Red Sox: RF Mookie Betts returned to the lineup after missing two games with inflammation in his left wrist. He was hitless in three at-bats.

UP NEXT

The teams play Game 2 of their four-game, season-ending series on Friday night. RHP Charlie Morton (13-7, 3.63 ERA), who has won two straight starts and three of four in September, will face Boston RHP Doug Fister (5-8, 4.87), who is winless in his last three starts as he faces his former team.