NEW YORK, N.Y. - A year ago, no one could've pictured this. Yet here they were, Dallas Keuchel and the Houston Astros, soaking in champagne, merrily posing for a victory shot on the mound at Yankee Stadium.

After all that losing, this was one October win to remember.

Pitching on three days' rest for the first time in his career, Keuchel baffled New York for six innings of three-hit ball. Colby Rasmus and Carlos Gomez homered, and the Astros beat the Yankees 3-0 Tuesday night in the American League wild-card game.

"Nobody really gave us anything at the start of the year. And I don't think anybody gave us a shot at the end of the year," said Keuchel, the AL's only 20-game winner.

The orange-clad Astros, who secured their spot in this winner-take-all game on the last day of the regular season, advanced to the Division Series against the defending AL champion Royals starting Thursday night in Kansas City.

Aggressive from the start in their initial playoff appearance as an AL club — and first since being swept by the White Sox in the 2005 World Series — the Astros came out swinging against Masahiro Tanaka in front of a revved-up Bronx crowd.

Rasmus sent Tanaka's first pitch of the second inning soaring into deep right field. Gomez, who only had five plate appearances after missing nearly two weeks with a strained chest muscle in mid-September, connected on the first offering of the fourth.

"That really settled me down, and that's who we are," Keuchel said. "We hit a lot of home runs, pitch well and play defence."

AL hits leader Jose Altuve had an RBI single off All-Star reliever Dellin Betances in the seventh.

Reliever Tony Sipp walked one, and Will Harris and Luke Gregerson were each perfect for an inning to finish the three-hitter. The boos from the 50,113 stunned fans in the crowd grew with each out as Gregerson closed for a save.

The Astros raced to an area between first and second after Brian McCann grounded out to end it and jumped up and down in a big scrum. As he was coming off the field, Keuchel pumped his fists toward a group of cheering Astros supporters in orange shirts — a few in big black beards — behind the visiting dugout.

It was a celebration a few years in the making, a raucous 30-minute party in the visiting clubhouse that carried onto the field. The Astros had averaged 104 losses in their previous four seasons.

"Now we get to go to Kansas City. It's going to be some grind-it-out baseball," Rasmus said. "We have to come in there the way we came in tonight. It's going to be fun."

In a matchup of teams that surprised many by building big division leads and then wasting them, the upstart Astros, just two years removed from a 111-loss season, looked the more comfortable team in the October limelight.

They clowned around during pregame introductions, and stayed loose the whole game.

The Yankees lost six of seven to close the regular season. Then before working out Monday, they learned CC Sabathia was checking into an alcohol rehab facility and would miss the post-season.

Despite all the talk of a playoff reset for the struggling lineup, New York went bust against a new nemesis in its first post-season game of the post-Derek Jeter era.

"Just didn't get it done," manager Joe Girardi said.

Fans taunted the 27-year-old Keuchel the moment he walked to the outfield for warmups. Then he toyed with the Yankees from the first batter, striking out Brett Gardner looking.

"It's hard not to get up for a game like this," Keuchel said of pitching on short rest. "I've worked so hard the last four years in the big leagues, especially with rebuilding with our team. I knew if we had a shot, I was going to give everything I possibly could."

Gardner, McCann, Chris Young and Girardi had words with plate umpire Eric Cooper as Keuchel cruised through New York's lineup for the third time this season.

The AL Cy Young Award contender held the Yankees scoreless for 16 innings in two regular-season starts. On this much bigger stage, the lefty was just as confounding, dropping his slider and two-seam fastball seemingly wherever he wanted in striking out seven as nearly all his teammates and coaches stood along the dugout railing for every pitch.

When he gave up two singles in the sixth — bringing the crowd to its feet with Alex Rodriguez stepping into the batter's box — manager A.J. Hinch took a walk to the mound to give Keuchel a breather. Keuchel responded by getting A-Rod to fly out lazily to centre field for his final out.

"''He was as good as it gets," A-Rod said. "He was Greg Maddux from the left side."

Keuchel is the first pitcher with a scoreless post-season start on three days' rest since Josh Beckett pitched a shutout for the Marlins at Yankee Stadium in the clinching Game 6 of the 2003 World Series, STATS said.

Tanaka struggled with the long ball, giving up 25 homers in 24 starts this year. He only allowed two more hits in five innings but matched a season high with three walks.

ACE IN THE BOOTH

Tampa Rays ace Chris Archer has a new October gig, analyst for ESPN. "I did get a little nervous initially but we've already done one segment of 'Baseball Tonight,' so I'm good now," he said.

TIME'S UP

During the regular season the countdown clock between innings was set to 2 minutes, 45 seconds for a national TV game. It was 3:15 for the first post-season game of 2015.

TRAINER'S ROOM

Astros: Jed Lowrie pinch hit in the ninth for Gomez, who looked as if he tweaked his injury while batting in the sixth. "Every time I swing, I swing and I miss, I feel it," Gomez said.

UP NEXT

Hinch will set his rotation for the Division Series. Houston went 4-2 against the Royals this season.