KANSAS CITY -- In the biggest game of his career, right-hander Johnny Cueto delivered, holding down the Astros for eight innings on two hits and two runs while helping the Royals secure a 7-2 victory in Game 5 of the American League Division Series on Wednesday night, sending them on to face the Blue Jays in the AL Championship Series.

The Royals, the defending AL champions, open the ALCS on Friday (7:30 p.m. ET on FOX/Sportsnet) against the Blue Jays at Kauffman Stadium. It's a rematch of the 1985 ALCS, won by Kansas City in seven games. The victory likely helped boost the mood of the local community in the wake of the heartbreaking news of the two Kansas City Fire Department firefighters who lost their lives in the line of duty on Monday night. The Royals honored their memories in pregame ceremonies.

A performance like Wednesday's is what the Royals had in mind when they traded with the Reds to acquire Cueto, who struggled during an awful late-season five-game stretch in which he carried a 9.57 ERA. But Cueto was nails when it mattered most, setting down the last 19 hitters he faced Wednesday, as he became the first to retire the last 19 he faced in a postseason game since Phillies ace Roy Halladay set down 21 Cardinals in a row in 2011. The 19 consecutive batters retired were the most by an AL pitcher in the postseason since Don Larsen's perfect game for the Yankees in the 1956 World Series.

:: ALDS: Astros vs. Royals -- Results ::

"Games like this is where you see Johnny Cueto, the real Johnny Cueto come out," Cueto said. "I told my teammates I was going to show up today and get this 'W' for them. I woke up today on the right foot. As soon as I woke up, I felt something magic that this was Game 5 and I had to show up for everybody, for my team and the fans."

• Determined Cueto superb in winning clincher

"He was unbelievably good," Kansas City manager Ned Yost said. "He didn't make a bad pitch all night. That pitch that [Luis] Valbuena hit was a good pitch. He came in after the eighth inning and was lobbying to go back out in the ninth. And I'm like, 'Look, I got the best reliever [Wade Davis] in the game down there; he's going to come in and close it out.'"

The Astros' storybook season ended after winning the AL Wild Card Game presented by Budweiser over the Yankees and having a 2-1 lead in this series over the Royals. Valbuena had given Houston a 2-0 lead on Wednesday with a two-run jack in the second inning.

"It's very tough. There's not a man in that room that wanted the season to end," Astros manager A.J. Hinch said. "There's going to be 29 teams that go through what we're going through today. There's going to be one champion. So it hurts. It hurts to know that we put everything that we could into this season and it ends abruptly. Seasons like this end really quickly, and you're never ready for it. It never feels good."

Alex Rios put the Royals ahead with a two-run double to left in the fifth inning. And Kendrys Morales, who homered twice in Game 1, sealed it with a three-run homer in the eighth off Astros ace Dallas Keuchel, who came on in relief.

"This is a big step for us," Royals first baseman Eric Hosmer said in a postgame interview on FOX Sports 1. "We worked real hard to get back to this point. You've got to tip your cap to Houston right there, they played a heck of a series. It seemed like we were coming back or we were behind with our backs against the wall pretty much every single game. So just a great series overall. I'm glad we could come out on top."

MOMENTS THAT MATTERED

Rios double: Rios, maligned at times by the Royals' fanbase, came through with two hits, none bigger than a two-run double in the three-run fifth. Rios came up with runners on second and third and none out with Kansas City trailing, 2-1. Rios pulled a Mike Fiers pitch down the third-base line and over the bag as both runners raced home for a 3-2 lead. Ben Zobrist later added a sacrifice fly to make it 4-2.

• Rios savoring 'sweet' time in postseason

Playing in his first postseason, Rios said, "It's a special feeling. I love playing with these guys. We've had a lot of fun this year."

Added Zobrist, "It's great, but we still got work to do."

McHugh can't get past fifth: McHugh, a 19-game winner who beat the Royals in Game 1 of the ALDS, only recorded 12 outs. He started the fifth with a 2-1 lead and hit Salvador Perez with a pitch, and Alex Gordon followed with a double, ending McHugh's day. He threw 72 pitches (45 strikes).

LoCain hustle: The Royals got on the board in the fourth when Lorenzo Cain poked a checked-swing single to right. Then, Cain took off running with Hosmer up and a 3-2 count. Hosmer broke his bat, but he looped a single to center and Cain raced for third. Center fielder Carlos Gomez slipped as he met the ball, and Cain was waved home by third-base coach Mike Jirschele and scored easily.

• Cain's hustle lets Jirschele waive him home

"I couldn't tell what was going on, but saw Jirsch start waving and I just got it going again," Cain said.

WHAT'S NEXT

Astros: Houston's impressive season ends after a tough loss in Game 5 of the ALDS. The Astros will open the 2016 season at Yankee Stadium on Monday, April 4, and they will begin play at Minute Maid Park on Monday, April 11, against the Royals.

Royals: Kansas City moves on to the ALCS against Toronto starting on Friday at Kauffman Stadium. Right-hander Edinson Volquez likely will get the nod in Game 1, though Yost made nothing official after Wednesday's game. That likely would set up right-hander Yordano Ventura for Game 2 on Saturday, with Cueto then lined up to pitch Game 3 at Rogers Centre on Monday.