Austin — Texas needed its best game of the season against Kansas State.It got it.Without arguably their best players on both sides of the ball, the Longhorns were able to hang on to top the Wildcats 31-21 in front of 95,248 at Darrell K Royal-Texas Memorial Stadium on Saturday night.The victory marked the first time the Longhorns (2-2) have beaten Kansas State (2-2) since 2003.“This is a team we haven’t beaten in a while. It was good to beat K-State and get our first conference win,” defensive end Jackson Jeffcoat said. “We knew it was a fresh start in conference [play]. It was 0-0 in conference and now we’re 1-0, which is big.”David Ash threw for 166 yards and one touchdown before leaving the game at halftime and is being evaluated for a head injury. Linebacker Jordan Hicks was carted off the field in the third quarter after suffering a left ankle sprain and is out for the season after he was diagnosed Sunday with an Achilles tendon injury.But former Aledo star Johnathan Gray ran for a career-high 141 yards and two touchdowns to pace the offense, and the defense didn’t let either of Kansas State’s two quarterbacks hurt the Longhorns too much while Texas snapped a five-game losing streak against the Wildcats.“You never want to go 1-2,” Gray said. “You always want to start conference [play] right. We had to hit them in the mouth and prove a point. That’s what we did tonight.”Ash started for the first time in two weeks, fully recovered from a concussion and right shoulder injury he suffered in a loss to BYU earlier this month. He helped Texas take a commanding 17-0 lead, hitting Kendall Sanders for a 63-yard touchdown toss in the second quarter.But Case McCoy took the snaps for the Longhorns in the second half, letting Texas’ running game and defense do the heavy lifting. He completed 5 of 9 passes for 59 yards but spent most of the second half handing the ball off.After Desmond Jackson recovered a John Hubert fumble on the opening possession of the third quarter, Alex De La Torre took a fake punt 19 yards on a fourth-and-2 conversion. Momentum on their side, the Longhorns punched it in, as Gray scored on a 15-yard touchdown run.Hubert scored his second touchdown of the game in the fourth quarter, a 4-yard run, but Kansas State was unable to establish a rhythm on offense. Texas forced the Wildcats to punt on their first four drives.The Longhorns allowed more than 300 rushing yards per game in their first three contests, but held Kansas State, which didn’t reach Texas territory until there were two minutes left in the first half, to 128 yards on the ground.“I don’t call them by their numbers anymore. I’m starting to call them by their names,” said new defensive coordinator Greg Robinson in his second game on the job. “I’m starting to be able to think in [the defensive staff’s] terminology, which is helping me. There’s progress being made.”As well as Texas defended the run, however, it had a hard time containing Kansas State’s Tyler Lockett, who caught a career-high 13 passes for a school-record 237 yards. The Wildcats went deep into Texas territory on each of their last two possessions, but fumble recoveries by Dalton Santos and Chris Whaley sealed the Longhorns’ victory.For now, the Longhorns will enjoy taking a major step toward turning their season around. Texas won only one of its three non-conference games but, most importantly, is 1-0 in Big 12 play.