MANHATTAN, Kan. (AP) Skylar Thompson wanted to hit Isaiah Zuber on the final play of the game, only the Kansas State wide receiver was so tightly covered that the young quarterback had to scramble to his left.

Then, he turned around and scrambled to his right.

Thompson was just about ready to put his head down and dive for the goal line when Zuber, the guy he wanted all along, popped open in the end zone. And with a deft flick of his wrist, Thompson's pass found its target and gave the Wildcats a stunning 20-19 victory over Iowa State on Saturday night.

''I don't remember much. It happened so quick,'' said Thompson, who threw for 152 yards, none of them bigger than the one yard he needed at the end. ''I just wasn't afraid of the moment.''

Even as a freshman, Thompson has already proven that much. He rallied the Wildcats (7-5, 5-4 Big 12) past Texas Tech, led them to an upset of Oklahoma State, then showed his immense potential in engineering a 10-play, 87-yard drive that took every second of the 1 minute, 55 seconds left in the game.

''He's a very poised young man,'' Kansas State coach Bill Snyder said. ''He has a confidence level that I think is appropriate for the position he plays. He expects it to happen and I like guys like that.''

Kyle Kempt threw for 264 yards and two touchdowns for Iowa State (7-5, 5-4), who blew a 19-7 fourth-quarter lead to lose its 10th straight to the Wildcats. The Cyclones had a chance to put things away, but Kempt misfired on third-and-6 at the Kansas State 49 in the final minutes.

''I was really proud of the effort of our kids,'' Cyclones coach Matt Campbell said, ''but in reality it comes down to a little bit of detail and unfortunately when we had our opportunity to put the game away in some instances we didn't do it. Credit to their kids for preventing that.''

The game lived up to its ''Farmageddon'' nickname: Two old-school, ground-and-pound teams going at it, a slobber-knocker reminiscent of when these teams met in the old Big Eight days.

The Cyclones struck first with a field goal, but it came at a cost when top rusher David Montgomery left with an injury on the game's first series. Kansas State answered with a touchdown drive that Thompson capped with a short run, albeit one that was set up by a short field.

That was the only offense the Wildcats managed until the fourth quarter. They only had 53 yards at halftime, even though they took a 7-6 lead into the break.

''We just had a tough time getting things going,'' Thompson said.

The Cyclones had no such problem in the second half, taking the lead on Marchie Murdock's touchdown catch midway through the third quarter. Then, they pushed their advantage to 19-7 on Hakeem Butler's grab in the corner of the end zone with 13:46 left in the game.

Kansas State finally resorted to using the Wildcat formation to march downfield, and still needed a trick play to score - running back Alex Barnes' pop-pass to Winston Dimel on third-and-goal at 3. But the play seemed to energize the home sideline, and the defense channeled that energy on the field.

They gave up a long first-down play, then stopped Iowa State's next conversion attempt, when a flag for pass interference on third down was picked up and the Cyclones were forced to punt.

It was one of several flags picked up during the game, most going against the Cyclones.

''I said this after our game against Oklahoma State, officiating is hard,'' Campbell said. ''It is a tough business, a tough possession. ... They did the best job they could, just like our kids.''

THE TAKEAWAY

Iowa State wrapped up the season losing three of its last four games, though the seven wins was a big step in the right direction. Sheldon Croney ran for 63 yards in place of Montgomery, but it was clear the Cyclones' offense suffered without their top rusher.

Kansas State never got its offense on track until the fourth quarter. Making things even tougher was a crucial personal foul penalty on special teams coach Sean Snyder late in the game. Still, the Wildcats made it a memorable Senior Day with their spirited finish.

OFFICIAL STATEMENT

When asked about the pass interference flag he picked up late in the game, referee Reggie Smith told a pool reporter: ''Per Big 12 policy, officials cannot discuss a judgment call.''

UP NEXT

Iowa State awaits its first bowl bid since the 2012 Liberty Bowl.

Kansas State prepares for its eighth straight bowl game.

---

More AP college football: http://collegefootball.ap.org and https://twitter.com/AP-Top25

Copyright 2017 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.