STARKVILLE, Miss. (AP) Skylar Thompson only threw one touchdown pass in Kansas State's 31-24 road win at Mississippi State, but boy was it a big one.

With 5:37 left in the fourth quarter and the game tied 24-24, Thompson rolled out and found Dalton Schoen wide open in the right side of the end zone and hit him with a 15-yard pass that would ultimately stand as the game-winner.

''He lives for those moments,'' KSU head coach Chris Klieman said. ''He's prepared for that moment.''

Thompson threw for 123 yards on 10-of-18 passing and managed to keep the Wildcat offense from crumbling under the pressure of self-inflicted wounds and a hostile crowd. It is the first time Kansas State has beaten a Power Five nonconference team on the road since 2011.

''I thought he did a great job of staying calm under a lot of pressure,'' Klieman said. ''I think we were running the football pretty successfully in the first half, and I think in the second half they decided they were going to find a way to bring pressure.''

KSU (3-0) led 17-14 at halftime but trailed 24-17 in the fourth quarter. Then a 100-yard Malik Knowles kickoff return tied the game, and Thompson's touchdown pass gave the Wildcats a 7-point lead.

MSU (2-1) drove 55 yards on their final meaningful possession, but ultimately turned the ball over on downs at the Kansas State 20-yard line, one yard short of the first-down marker.

''The guys just never quit,'' Klieman said. ''It was hot out there and we played a ton of bodies, had guys cramping up, but one thing we talked about was finishing the game and they did that. The guys were really excited about playing this game.''

The Wildcats managed only 269 yards of total offense, 146 of it on the ground. Schoen caught a team-high three balls for 50 yards and James Mitchell rushed for 59 yards on 17 carries.

Mississippi State head coach Joe Moorhead benched senior transfer quarterback Tommy Stevens in the third quarter after his second interception and turned the Bulldog offense over to freshman Garrett Shrader.

''When we went in at halftime, he stiffened up a bit,'' Moorhead said. ''He wasn't able to make the throws he did in the first half, so we decided to let him be.''

Shrader led the Bulldogs on a methodical 12-play, 79-yard drive, running the ball into the end zone himself to give the team its first lead. From there, though, he presided over three-and-outs on three of the next four drives and the Bulldogs never reached the end zone again.

''We're going to look back and see probably three or four plays in each phase that we could improve on,'' Moorhead said.

MSU's Osirus Mitchell led all receivers with 74 yards and Kylin Hill, the Southeastern Conference's leading rusher, had a game-high 111 yards on 24 carries.

THE TAKEAWAY

Kansas State: The Wildcats are not a flashy team, but they have a balanced offensive attack with lots of ways to beat you. This was a big road win for a program that needed it.

Mississippi State: Despite flashes of prowess, the Bulldogs looked sloppy and unprepared at some point in every phase of Saturday's game. Big questions remain on both sides of the ball.

HOT AND HUMID

With an 11 a.m. start in the balmy Mississippi heat, neither team played mistake-free football. Mississippi State had two interceptions and two fumbles, but managed to recover one. Kansas State fumbled the ball four times, twice on punts, and also managed to recover only one of them. The two teams combined for 14 penalties and 142 yards.

''You have to try to minimize those things, but you can't let them destroy you,'' Klieman said. ''Nobody panicked on the sideline in any of those situations.''

LONG TIME COMING

This is Kansas State's first program victory over Mississippi State in four meetings. The Wildcats lost 31-10 last year in Manhattan. The two schools traded home-and-home games in 1974 and 1977 and both were Bulldog wins.

UP NEXT:

Kansas State has an open week before traveling to Oklahoma State.

Mississippi State returns to Southeastern Conference play next week, hosting Kentucky.

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.