The defending World Series champion Houston Astros have won the AL West again.

Houston captured its second consecutive AL West title with a 4-1 win over the Toronto Blue Jays followed by the Oakland A's 10-8 walk-off loss in 11 innings to the Seattle Mariners. It is the eighth division title in the Astros' franchise history.

The Astros got an unexpected challenge in the season's second half from the Oakland A's. The Athletics were 36-36, 12 games back of Houston, on June 18.

Since then, however, the A's have been among the best teams in baseball, sitting at 95-63. But the Astros kept the pedal to the metal as well, holding off the A's to clinch the division at 5.5 games up.

A first-round matchup with the Cleveland Indians awaits the Astros in the ALDS as they attempt to become the first team to repeat as World Series champs since the New York Yankees won three in a row from 1998-2000. Game 1 of the Astros' title defense will come at home on Oct. 5.

The A's are now officially locked into the wild-card game against the New York Yankees.

It looked like Oakland would delay Houston's celebration an extra day, but the A's fell apart late against the Mariners. The A's were up 8-5 entering the bottom of the eighth, but Fernando Rodney allowed two runs in the eighth before Blake Treinen blew the save in the ninth.

It wasn't all on Treinen, one of the best closers in baseball this season, though. Third baseman Matt Chapman bobbled a ball hit by Ryon Healy with two outs in the bottom of the ninth, allowing Healy to reach first safely and advancing Ben Gamel to second.

Gamel scored thanks to a Kyle Seager single, and the A's handed the division to the Astros when the Mariners' Chris Herrmann hit a walk-off homer for the winner.

Even though it was after 2 a.m. on the East Coast – and with a 4 p.m. start Wednesday in Toronto – the Astros stayed up to potentially celebrate their title. And thanks to the Mariners' comeback, they were able to.

All that remains in the AL playoff race is determining who hosts the wild-card game. The Yankees now hold a 2.5-game lead on the A's for that honor.