PHOENIX (AP) — The Houston Astros celebrated clinching a playoff spot with T-shirts and a subdued toast.

A day later, after rallying to claim a bigger prize in their crosshairs, the Astros held an all-out locker room rager of cigars and champagne-and-beer showers that left puddles on the plastic-covered floors.

A season of injuries and inconsistencies ended with another division title. Even for a team that won the World Series last fall, that’s worth celebrating.

The Astros rallied to clinch their third straight AL West title, beating the Arizona Diamondbacks 8-1 on Sunday behind Christian Javier’s six strong innings and Alex Bregman’s two-run homer.

“A lot of people wanted to know what it’s like if the Astros didn’t win the division,” Bregman said before popping the cork on a champagne bottle. “I guess we’ll never know.”

Needing a win and a Texas loss to win the division, the Astros did their part by jumping on Kyle Nelson (7-4) from the first pitch. Houston had a 5-0 lead after two innings and Javier (10-5) held an Arizona lineup mostly devoid of everyday players to three hits.

Kyle Tucker had a sacrifice fly to finish with 112 RBIs, most in the AL and third in the majors. José Abreu added a two-run homer in the seventh to clinch Houston’s sixth AL West title in seven years after the Rangers lost 1-0 to Seattle.

The Astros have a first-round bye in the AL playoffs while Arizona will play at Milwaukee in a best-of-three NL wild card series that starts Tuesday.

“At the end of the day, we kept it within striking distance and put it together at the end, which makes it very special,” Houston general manager Dana Brown said.

Houston had a solid follow up to its second World Series title, finishing 90-72 after going 106-56 last season. The Astros’ fourth straight victory to close the regular season gave manager Dusty Baker his 13th season with at least 90 wins.

“I didn’t want to end on 89 and we got to 90,” Baker said in between champagne dousings.

The Diamondbacks backed into the playoffs, scoring two runs in three games against the Astros to close the regular season on a four-game losing streak. Arizona finished 84-78 after going 74-88 last season and losing 110 games the year before.

“You definitely want to finish on a high note, but it’s whatever and you’ve got to throw it away,” Diamondbacks outfielder Alex Thomas said. “Now we’ve got October baseball to focus on.”

The Astros and Diamondbacks had dual celebrations Saturday night after clinching playoff spots.

Houston did it with a 1-0 victory over Arizona that led to a muted reaction in the clubhouse for the reigning World Series champions.

The Diamondbacks celebrated in the dugout when Cincinnati’s 15-6 loss to St. Louis clinched their first playoff berth since 2017. They had a much more raucous celebration after the game, a party that spilled over into the pool behind Chase Field’s right-center wall.

Still within reach of the AL West title, the Astros jumped on the Diamondbacks early, needing two pitches to take a 2-0 lead.

Jose Altuve opened with a single and Bregman followed with his 25th homer, a two-run shot to left. Houston scored another run on Arizona first baseman Emmanuel Rivera’s throwing error and went up 4-0 on Jeremy Peña’s run-scoring single.

Tucker hit a sacrifice fly in the second inning and made it 6-0 in the fifth with a triple and head’s up baserunning after Diamondbacks shortstop Jordan Lawlar held the relay throw.

“Maybe we were a little flat, most of us were probably up a little late last night,” Arizona manager Torey Lovullo said. “For sure there was a little lull in focus and energy. I get that, but let’s push that aside.”

HOMER, NO HOMER

Tucker’s bid to become the second member of Houston’s 30-30 went on a wild ride.

Tucker’s triple and run in the fifth was initially ruled an error on the Diamondbacks, then a fielder’s choice.

After consultation with the Elias Sports Bureau, the official scorer changed it to an inside-the-park homer, seemingly giving Tucker his 30th homer.

One inning later, after another consultation, Tucker’s hit was changed back to a triple and fielder’s choice, leaving Jeff Bagwell (1997 and 1999) as the only Houston player with 30 homers and 30 stolen bases in a season.

DIAMONDBACKS ATTENDANCE

The Diamondbacks drew 30,703 fans for their final home game, finishing with 1,961,182 for the season. It was Arizona’s highest home attendance since eclipsing 2.1 million in 2019.

UP NEXT

Houston: The Astros have a first-round bye in the AL.

Arizona: The Diamondbacks will face Milwaukee in an NL wild card playoff series starting Tuesday.