MANHATTAN — It took nearly four quarters, but the Kansas State Wildcats finally found what they were looking for.

Skylar Thompson scored on a 3-yard run with 2:45 left, capping an 11-play, 95-yard drive Saturday to give the Wildcats a much-needed 24-17 Big 12 victory over TCU at Bill Snyder Family Stadium.

The winning drive, which consumed 5 minutes, 18 seconds, included a 2-yard red-zone pickup on fourth down by Thompson, who also put the Wildcats in position to score with a long run from deep in K-State territory.

"I'm so excited for the players and the coaching staff," K-State coach Chris Klieman said after the Wildcats snapped a two-game losing streak that, thanks to a pair of bye weeks, had stretched over a month. "We put a lot of hard work in the last two weeks and we know it's not perfect by any means, but I can't tell you how happy I am with the resolve those guys showed.

"It was a back-and-forth game and we made some plays we hadn't made in the past, and credit to our guys that made the plays."

The biggest plays on offense came from Thompson on the final drive. With the Wildcats backed up on their 5-yard line after a TCU punt, he got them out of a hole with the perfect call.

On second and 5 from the 10, he burst up the middle on a quarterback draw, found wide-open space in front of him and finally broke to the left sideline before going out of bounds at the TCU 29 for a 61-yard gain.

"I knew we were backed up and I didn't want to take any chances," Thompson said. "We called the quarterback draw and they gave us the look that we anticipated all week on film, so I knew it was going to be a good play right before I even said hike.

"We executed it great, so it was a big play for us."

Three plays later, the Wildcats faced fourth and 1 at the 20, and Klieman never hesitated.

"It was not a question in our mind that we were going for that on fourth down because I didn't want to have a three-point lead," Klieman said. "We wanted to have a seven-point lead."

The play appeared to be bottled up for Thompson, who stretched it to the sideline and was able pick up 2 yards to keep the drive alive. After a 10-yard completion to Malik Knowles made it first and goal from 7, Harry Trotter picked up 4 yards to the 3, and Thompson ran in untouched for the winning touchdown.

"That's what it's all about for me," Thompson said. "I told the guys in the hotel last night that I'm going to be ready for four quarters tomorrow and I'm going to bring it and lead to the best of my ability, and for them just to stick with me and believe in me.

"It was so much fun man, to get in that huddle and the game's on the line. It's fourth and 1 and our (offensive) line is telling me, 'I love you,' and everybody is telling each other they love each other and we got it. That's what this game's all about."

The Wildcats still had work to do defensively. After TCU moved the ball to the K-State 36, defensive end Wyatt Hubert came up big, sacking Max Duggan for a 9-yard loss, and on fourth down he again applied pressure that forced an errant pass.

"Coach Haze (defensive coordinator Scottie Hazelton), perfect call, put us in position to make that play," Hubert said.

From there, K-State nearly ran out the clock out. Devin Anctil's booming 55-yard punt gave TCU one final shot from its 23-yard line with 2 seconds left.

With the victory, K-State improved to 4-2 overall, 1-2 in the Big 12. TCU fell to 3-3 with a 1-2 league record.

TCU outgained K-State 366 yards to 266, holding the Wildcats to 94 yards rushing, though the Wildcats took several losses while killing the clock.

Thompson completed 11 of 23 passes for 172 yards and two touchdowns, plus led the Wildcats in rushing with 68 yards on 10 attempts. Malik Knowles came back from a foot injury to catch three passes for 48 yards and Wykeen Gill had three grabs for 45 yards and a score.

Duggan ran for 115 yards on 13 carries and completed 16 of 29 passes for 132 yards.

K-State extended its 14-10 halftime advantage by taking the second-half kickoff and driving 59 yards to the TCU 3 before settling for a 21-yard Blake Lynch field goal. But TCU answered immediately, marching 75 yards in just five plays with Duggan scoring on a 46-yard run with at least four missed tackles by the Wildcats.

Kansas State limited TCU's explosive plays in the first half and got a big special teams play of its own on the way to the four-point halftime lead.

The Wildcats managed just 44 yards total offense in the first quarter but still led 7-0 on a 21-yard strike down the middle of the field from Thompson to tight end Nick Lenners with 9:56 left in the period. The touchdown was set up by Jonathan Alexander's blocked punt that put the ball at the TCU 20.

TCU tied it early in the second quarter with a 10-play, 76-yard drive that featured a heavy dose of running back Sewo Olonilua, who scored on an 8-yard run.

But K-State's offense came alive midway through the period with a 74-yard drive of its own, culminating in a 13-yard completion to Gill at the 5:30 mark.

TCU came back to kick a field goal with 33 seconds left in the half to cap a 54-yard drive that included a pair of 15-yard K-State penalties.

K-State had 122 yards total offense in the half but just 40 on the ground. Thompson was 5 of 10 passing for 82 yards, while Gilbert had eight carries for 32.

TCU finished the half with 154 yards, including a balanced 115 on the ground with Olonilua picking up 44, Darius Anderson 36 and Duggan 34. Duggan completed 5 of 11 passes for 33 yards.