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 Eduardo Rodriguez in the second inning on Thursday night to win 12-2 and keep the host Red Sox 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 victory or Yankees loss to clinch the first back-to-back division titles in franchise history; otherwise, the teams would meet in a one-game tiebreaker in New York on Monday to see who needs to play host to the Twins in the AL wild-card game.

Tampa Bay 9, New York 6: Aaron Judge hit his 51st home run for a quick lead that was squandered when Sonny Gray and the bullpen fell apart for the host Yankees. The Rays scored seven runs in the fifth inning.

Oakland 4, Texas 1: Ryon Healy hit a two-run single in the sixth inning as the Athletics handed the Rangers their seventh loss in a row. A's catcher Bruce Maxwell took to a knee in the bullpen during the national anthem.

Chicago 5, Los Angeles 4: Rob Brantly hit the tying home run in the eighth inning and Tim Anderson hustled home for the go-ahead run as the host White Sox rallied past the Angels.

Detroit 4, Kansas City 1: Daniel Norris threw five scoreless innings to pick up his first victory in more than three months as the visiting Tigers ended a nine-game losing streak.