MANHATTAN — One week after a dazzling offensive performance, Kansas State barely could produce a positive play for three quarters.

Then, the legend of Skylar Thompson grew.

Thompson, the freshman quarterback, took K-State 87 yards in 10 plays in the final 1:55 and fired a 1-yard touchdown pass to Isaiah Zuber on the final play of the game for a 20-19 victory over Iowa State on Saturday at Bill Snyder Family Stadium.

Thompson, making his third start, completed four straight passes to kickstart the final drive, which began at the KSU 13-yard line with 1:55 remaining and two timeouts.

An eight-yard pass to Dominique Heath on second-and-1 at the 9 left the Wildcats one yard short. Thompson threw an incomplete pass on the first down, then scrambled from his left to right to buy time and Zuber got open in the back of the end zone to complete the comeback.

The Wildcats concluded the regular season with a 7-5 record, 5-4 Big 12, and will play in a bowl game for the eighth consecutive year.

Thompson completed 15 of 21 passes for 152 yards. The Wildcats struggled offensively, managing only 99 total yards and three first downs through three quarters before springing to life in the fourth quarter.

Iowa State (7-5) led 3-0 after the first quarter before trailing 7-6 at halftime.

But the Cyclones went ahead again after the third quarter, 12-7, setting up the wild finish.

Iowa State has now lost three of its last four games by a combined 12 points.

The Wildcats won for the fourth time in the last five games. The only setback was a 28-23 loss to West Virginia.