PHOENIX (AP) — The Arizona Diamondbacks watched another team celebrate at Chase Field for the second straight season.

This one was much easier to take, not just because the opposing players stayed out of the Chase Field pool, but because they Diamondbacks appear to be on the right track in their rebuilding process.

"We saw so much individual and team improvement," First baseman Paul Goldschmidt said after the Diamondbacks beat the Houston Astros 5-3 on Sunday. "Not just the wins, but the way guys were playing."

The Diamondbacks were irritated last season when the Dodgers clinched a playoff berth at Chase and hopped the wall in right-center to play in the pool.

The Astros were much more subdued on the field, sharing a few high fives in the dugout after learning they had clinched the AL wild card with the Los Angeles Angels' loss to the Texas Rangers.

Houston's real celebration didn't begin until the clubhouse, where manager A.J. Hinch gathered his players around, took a puff from his victory cigar and told everyone to quiet down.

"You can say a lot of things about this team, but one thing they're going to say forever: We're a ... playoff team," Hinch told them while standing in puddles of beer and champagne.

It's hard to blame Finch and the Astros for letting loose. Their 10-year wait is over.

So what if they lost in the season finale. After everything they've been through, this sure was sweet.

"We didn't have the results a couple of years ago that we wanted, but we worked hard to be at this point," said Houston's Jose Altuve, who reached 200 hits for the second time in his career. "Now we are the team that everybody wants to be."

The Astros had two straight 100-loss seasons to end their tenure in the National League, tacked on another after switching to the American League in 2013. Last season was only marginally better; Houston lost 92 games.

Given little chance this season, Houston overcame a midseason slide by playing some of its best baseball down the stretch. The Astros won six of seven to take a one-game lead over the Angels headed into Sunday and clinched in the eighth inning with Los Angeles' loss.

Houston finished 86-76 to reach the postseason and will play its first American League playoff game Tuesday night, against the New York Yankees at Yankee Stadium.

"It's only the tip of the iceberg for us," Astros outfielder Jake Marisnick said. "This is kind of the first leap into the postseason, but hopefully this is going to be routine."

Arizona went 79-83 in its first season under general manager Dave Stewart and manager Chip Hale, a 15-game improvement from finishing with baseball's worst record in 2014.

Goldschmidt hit a two-run homer off Chad Qualls (3-5) and A.J. Pollock had a solo shot among his three hits for Arizona. Daniel Hudson (4-3) got the final two outs of the seventh inning and Brad Ziegler recorded six outs for his 28th straight save, matching the team record set by J.J. Putz from 2011-12.

"We treated it like playoff, like we have all season," Pollock said.

With numerous playoff scenarios on the table, the Astros were hoping to take care of their end of things by sending out Lance McCullers, the 22-year-old who leads all AL rookies with 3.19 ERA.

McCullers gave up a solo homer to Pollock in the first inning, putting the Astros behind right away. It was Pollock's 20th of the season, making him and Goldschmidt the first Arizona teammates to have 20 homers and 20 steals in the same season since Justin Upton and Chris Young in 2011.

The Astros and Diamondbacks went back and forth after that, Arizona going ahead, Houston tying it back up.

The Astros did it all while keeping an eye on the scoreboard, watching the Angels take an early lead, Texas fight back, then blow it open in the seventh inning.

Even after Goldschmidt hit a towering two-run homer to left in the seventh to put Arizona up 5-3, the Astros were happy, well on their way to clinching the wild card spot.

"We didn't really know what to do," Hinch said of scoreboard watching. "We knew we were in and it was a good feeling."

UP NEXT

Astros: Houston will face the Yankees in the AL wild card Tuesday in New York.

TRAINER'S ROOM

Astros: OF Carlos Gomez sat out his third straight game with sore ribs.

Diamondbacks: RHP Evan Marshall, who has been out since being struck in the head by a line drive on Aug. 4, rejoined the team on the bench for the season finale.