MANHATTAN, Kan. -- Collin Klein and Daniel Thomas ran for two touchdowns apiece and Kansas State intercepted Garrett Gilbert five times en route to a 39-14 victory Saturday night over struggling, mistake-prone Texas.

Thomas ran 34 yards for a touchdown on the second play from scrimmage, and things went downhill from there for the Longhorns (4-5, 2-4 Big 12), who are guaranteed their worst record in Mack Brown's 14 years as coach. The victory made Kansas State (6-3, 3-3) bowl eligible for the first time since 2006.

Klein, a surprise starter at quarterback over Carson Coffman, rushed for 127 yards and scored on runs of 12 and 10 yards.

Gilbert, the 6-foot-4 sophomore who replaced Colt McCoy this season, put more passes in Kansas State hands than did Klein, who was 2 for 4 for 9 yards. Klein's only completions were short tosses to Thomas, who went over the 1,000-yard rushing mark with 106 yards on 18 carries.

Thomas scored on a 9-yard run.

Gilbert was 32 for 59 for 272 yards and one touchdown. His interceptions led to 17 Kansas State points.

Another Kansas State touchdown drive was kept alive by two personal foul penalties against the Longhorns.

Stephen Harrison's interception of a tipped ball set up Josh Cherry's 30-yard field goal. Klein's 10-yard TD run followed Tysyn Hartman's first interception. Hartman's second interception led to Thomas' 9-yard scoring run.

Gilbert's 31-yard run in the fourth quarter set up Cody Johnson's 4-yard TD run, and with 31 seconds remaining, Gilbert tossed a 1-yard scoring pass to Dominique Jones.

Even when Texas did something right, it backfired. After William Powell made it 37-0 with an 8-yard run late in the third, Cherry's extra-point attempt was blocked. So Cherry simply picked up the ball, went to his left and carried it in for a 2-point conversion.

The Longhorns, who played Alabama last season for the national championship, lost for the fifth time in six games and fell below .500 for the first time since losing their 1999 opener. They will have to win their last three games -- home against No. 19 Oklahoma State, Florida Atlantic and Texas A&M -- just to match Brown's lowest victory total since going 7-5 at North Carolina in 1995. Also in jeopardy is Brown's string of taking 18 consecutive teams to a bowl.

At one point, Gilbert threw interceptions on three straight passes. With only seconds to go in the first half, Ty Zimmerman stepped in front of the receiver in the end zone and may have scored if Gilbert hadn't brought him down on the Kansas State 41.

Hartman then intercepted Garrett's first pass of the second half, returning it 34 yards to set up Thomas' 9-yard run.

Next, it was Zimmerman's turn again. He scooped in Garrett's underthrown ball on his next throw.

Personal fouls on Jordan Hicks and Marquise Goodwin kept Kansas State's last TD drive alive. Given a first down on the 28 after Goodwin slammed into punter Ryan Doerr, Powell picked up 20 yards on one carry and then scored from the 8 on the next.