Johnny Cueto was acquired by the Kansas City Royals in a trade with the Cincinnati Reds at the trade deadline to pitch in games like this for the Royals. Cueto lived up to the expectations on Wednesday night, leading to a victory in Game 5.

Cueto carried the Royals to a 7-2 victory over the Houston Astros, which has allowed Kansas City to win the American League Division Series and advance to the American League Championship Series against the Toronto Blue Jays.

The right-handed pitcher gave up two runs on two hits over eight innings of work. Cueto struck out eight hitters over 91 pitches on Wednesday night. The All-Star got the win, his first of the 2015 postseason.

Cueto retired the last 19 batters he faced in the contest, becoming the first American League pitcher since Don Larson's perfect game in 1956 to retire the final 19 batters faced in a playoff game.

The Astros, however, had Cueto's number early. Luis Valbuena knocked a two-run home run in the second inning to give Houston a 2-0 lead. It was a huge momentum boost for the Astros, but they fell apart once the Royals got hot at the plate.

Luis Valbuena runs the bases after his two-run home run to give the Astros a 2-0 lead -- Jamie Squire/Getty Images

It started when Eric Hosmer singled to center, which drove in Lorenzo Cain all the way from first base in the fourth inning. What looked to be a routine single that would advance Cain to second and possibly third, became a run scoring knock as Carlos Gomez fell down in center and Cain never stopped running and used his speed to score. Hosmer finished the game 1-for-4 with an RBI.

Just an inning later, Alex Rios drilled a two-run double to left field, which gave the Royals a 3-2 lead. The hit from Rios was set up by Alex Gordon, who hit a ground-rule double to put runners at second and third.

Alex Rios hits a two-run double down the third base line to give the Royals a 3-2 lead in the fifth -- Ed Zurga/Getty Images

Ben Zobrist, who was also acquired at the deadline, hit a sacrifice fly to right field to make it a 4-2 lead for Kansas City in the fifth inning.

Rios led the Royals with two RBI on 2-for-3 night at the plate. He increased his postseason average to .286, while Hosmer is now hitting .190 this postseason.

Collin McHugh gave up three runs on five hits and a walk over just four innings pitched. Mike Fiers relieved him and gave up just one earned run, the sacrifice fly to Zobrist. McHugh took the loss and finished the postseason with a 1-1 record and 4.50 ERA.

The Houston bullpen was solid the rest of the way, until the eighth inning rolled around. Astros manager A.J. Hinch called in ace left-hander Dallas Keuchel to toss in the eighth. Keuchel was on just two days rest after starting earlier in the series.

Alcides Escobar led things off with a double and Cain was intentionally walked to put two on base with two out for Kendrys Morales. The designated hitter found his sweet spot with a three-run blast to give the Royals a huge 7-3 lead over the Astros.

Kendrys Morales reacts after hitting a three-run home run to give the Royals a 7-2 lead and putting the game out of reach -- Jamie Squire/Getty Images

Kansas City's manager, Ned Yost, went with Wade Davis for the ninth inning. The 30-year-old shut the door with a perfect ninth to secure the win and a trip to the NLCS.

For the Astros, they will look towards the offseason and to the 2016 season. They have a young team and have more potential than any Major League team. Houston should make multiple returns to the postseason in the next 10 seasons.

The Royals will take on the Blue Jays in the ALCS starting on Friday. Toronto won Game 5 earlier today in come from behind fashion against the Texas Rangers to advance.