MANHATTAN, Kan. (AP) Texas coach Tom Herman talked with one of his predecessors, Mack Brown, just as he does every week, and the old Longhorns coach warned him about playing Kansas State in Manhattan.

They're a different team on the road, Brown said. They play with more energy, channeling the will of the crowd, and the team that was trounced by West Virginia last week wouldn't show up Saturday.

''It was very much the way we told our players it would be,'' Herman said.

The No. 18 Longhorns roared to a big lead, bogged down in the second half, then held on through a tense fourth quarter for a 19-14 victory that snapped a five-game road skid against the Wildcats.

''We won ugly, but the key is we won,'' Herman said. ''They all look pretty on Sunday morning.''

Sam Ehlinger threw for 207 yards and a touchdown, and D'Shawn Jamison returned a punt 90 yards for another score, as the Longhorns opened a 19-0 lead by halftime. Then, Keaontay Ingram churned for a first down with three minutes to go to help the Longhorns (4-1, 2-0 Big 12) seal the win.

''It shows our maturity, being able to overcome a lull in what's going on,'' Ehlinger said. ''A lot of offenses would have curled up but we chose to finish.''

Skylar Thompson threw for 96 yards in relief of ineffective quarterback Alex Delton, and he led the Wildcats (2-3, 0-2) to a pair of touchdowns in the second half. But after they got the ball back with 7:12 to go, Thompson threw a pair of incompletions as Kansas State went three-and-out, and coach Bill Snyder's offense never got another opportunity with the ball.

''All losses are painful. There is a variety of different reasons why didn't win the ballgame,'' Snyder said. ''I think we became a little better football team, not necessarily because of this game but because of the way we practiced last week.''

The Longhorns leaned on their defense in the opening half, getting a pair of sacks by Charles Omenihu - one for a safety - while shutting down Kansas State's powerful run game.

Meanwhile, the Wildcats' dismal half was summarized by the way it ended, when they had first-and-goal at the Texas 5. Alex Barnes was stuffed, and two runs by Delton went nowhere, before his pass on the final play hit fullback Adam Harter in the hands and dropped incomplete.

The result? Texas carried its 19-0 lead into the break.

The Longhorns were so stingy on defense - and Kansas State so inept on offense - that running back Tre Watson had more yards passing after a 21-yard halfback pass than the entire Wildcats roster in the first half. Delton was 3 of 7 for 14 yards.

In fact, Texas had more yardage in penalties (80) than Kansas State had on offense (64).

The Wildcats switched quarterbacks at halftime and Thompson promptly led them 82 yards on their opening possession, capping the drive by keeping it on third-and-goal for a 7-yard touchdown run.

Suddenly, that herky-jerky offense had found its rhythm.

Texas kicker missed an opportunity to extend the lead when he pushed a 47-yard field goal right, and Kansas State marched downfield again. Thompson hit Dalton Schoen to convert one fourth down, and Barnes plowed in on fourth-and-goal from the Texas 1 to make it 19-14 with 9:55 to go.

''We rallied together as a team and came out with a different mentality than we did in the first half,'' Kansas State linebacker Justin Hughes said.

But after forcing Texas to punt, the Wildcats went three-and-out and the Longhorns got the ball back. They managed to convert on third-and-11 before getting another first down to ice the win.

''When you look at our record,'' Herman said, ''you're not going to see half a `W' for this. They all count the same, and we told our guys, `Championships are won on the road.'''

BECK'S STATUS

Herman said that offensive coordinator Tim Beck was recovering after being hospitalized for a bacterial infection in his elbow and should rejoin the team soon. ''He had to be on IV antibiotics and had surgery Thursday to clean all that infection out,'' Herman said. ''That's a lesson for all of us, you have one of those nagging deals, you should get it looked at.''

STATS AND STREAKS

Ehlinger now has nine touchdown passes and just two interceptions this season. ... Texas had not won in Manhattan since 2002. ... Barnes finished with 80 yards rushing for Kansas State. ... The Wildcats' Isaiah Zuber had five catches for just 33 yards. He was coming off back-to-back 100-yard receiving games. ... Texas was flagged for 104 yards in penalties.

POLL IMPLICATIONS

The march up the rankings will likely continue for the Longhorns, who have followed their season-opening loss to Maryland with their longest win streak since the 2013 season.

UP NEXT

Texas: Face the Sooners next Saturday in Dallas.

Kansas State: Heads to Baylor next Saturday.

--

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

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