PHOENIX -- By the time the Astros' regular season ended with a 5-3 loss to the D-backs, they had already been assured of a Wild Card spot by way of the Rangers' division-clinching 9-2 win over the Angels.
With the Yankees' 9-4 loss to the Orioles, the Astros could have earned the right to host the AL Wild Card Game presented by Budweiser with a win, but Paul Goldschmidt's towering two-run home run off Houston reliever Chad Qualls in the seventh inning put the D-backs on top to stay at Chase Field.
With the loss, the Astros will give the ball to Dallas Keuchel for tonight's showdown at Yankee Stadium, airing at 7 p.m. CT on ESPN, in what will be Houston's first postseason game since the 2005 World Series. The winner of the Wild Card Game will advance to the AL Division Series to face the defending AL champion Kansas City Royals in a best-of-five series, beginning Thursday.
"We're back in the playoff hunt," Astros manager A.J. Hinch said. "We are every bit trying to represent the city of Houston and the fan base. People have suffered through a lot of low times, and we're back to bringing good times, and we're looking forward to more baseball."
Astros rookie shortstop Carlos Correa said the Astros never lost confidence through a rough September.
"We can go far," he said. "We've got to go out there and play hard every single day like we've done the whole year, and we can perform at an extremely high level and be all right."
Astros starter Lance McCullers gave up two earned runs and six hits in five innings on Sunday in a back-and-forth affair that Houston tied, 3-3, in the seventh when George Springer walked and later scored on a wild pitch.
"It was a fun game," D-backs manager Chip Hale said. "It was a fun game to play. Congratulations to the Astros for getting in. It's exciting. I remember them in 2012 when I was with the A's, and they've really built this thing into a really nice ballclub, so congratulations to them."
D-backs starter Robbie Ray went 4 1/3 innings and allowed two runs and seven hits, striking out eight batters. The D-backs finished the season with a 79-83 record.
MOMENTS THAT MATTERED Goldy sets the tone: Goldschmidt hit the deciding homer, but it was his fundamentally sound approach on the bases that drew his manager's praise postgame. Hale was impressed by Goldschmidt taking second on a wild pitch in the fifth, which allowed him to score on a ground-rule double, And his decision to cut off a throw to the plate in the third helped nip an Astros rally in the bud.
"Those are huge plays," Hale said. "Sometimes people don't talk about them, but that just shows you what kind of player Paul is and all our guys strive to be."
Error, wild pitch, balk hurt McCullers: McCullers dropped a flip from first baseman Chris Carter in the fourth inning, allowing Jake Lamb to reach. He went to third on a double by Ray and scored on a McCullers balk. The D-backs took a 3-2 lead in the fifth after McCullers' wild pitch moved Goldschmidt to second and allowed him to score on a ground-rule double by Jarrod Saltalamacchia.
Getting Ziggy with it: D-backs closer Brad Ziegler pitched the final two innings to pick up his 30th save and finish the season having converted 28 straight saves, the longest active streak in the big leagues. Ziegler's previous high saves total was 13 in 2013.
"We talked about bringing Zig in for one [Saturday night] just to get some work because he hadn't worked since Sunday in San Diego, so we decided, you know what, let's save him for two tomorrow if we have the opportunity," Hale said.
UPON FURTHER REVIEW
Astros manager A.J. Hinch successfully challenged a call at first base in the seventh inning. D-backs third baseman Lamb was originally called safe on a throwing error by pitcher Oliver Perez for pulling first baseman Carter off the base, but the call was overturned after replay showed Carter kept his toe on the bag.
"It was a little bit weird. There was a moment there where we knew we were behind but we also knew we had made the playoffs. You allow yourself a little bit of a celebratory smile. You still want to win the game. Home field was at stake, but it was a sense of relief there that we were going to play again and knew we were going to be one of the few teams that were left standing, and we earned every one of these 86 wins." -- Hinch, on clinching a Wild Card spot in the seventh inning
WHAT'S NEXT Astros: Keuchel, the only 20-game winner in the American League and a front-runner for the AL Cy Young Award, will get the ball on three days' rest for the Astros when they meet the Yankees and Masahiro Tanaka at 7 CT (on ESPN) tonight at Yankee Stadium. Keuchel is 2-0 in two starts against the Yankees and hasn't allowed a run in 16 innings against them.
Steve Gilbert and Brian McTaggart are reporters for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.