AUSTIN, Texas — (AP) — Cameron Dicker made a 33-yard field goal as time expired and No. 15 Texas survived Kansas' desperate upset bid 50-48 after the teams exchanged six touchdowns in the fourth quarter Saturday night.

Kansas took a 48-47 lead on Carter Stanley's 2-point conversion pass to Daylon Charlot with 1:11 to play. Sam Ehlinger then drove the Longhorns into field goal range for Dicker, who calmly drilled the winner. Ehlinger completed two big passes to Collin Johnson to keep the drive going for Texas (5-2, 3-1 Big 12).

Kansas, under first-year coach Les Miles, nearly had a victory that would have jumbled the Big 12. And the Jayhawks (2-5, 0-4) were oh-so-close. Pooka Williams rushed for 190 yards and two touchdowns for the and Stanley passed for 310 yards and four touchdowns.

RELATED: HIGHLIGHTS: No. 15 Texas Longhorns beats Kansas Jayhawks, 50-48, with game-winning field goal

'The Sandlot' cast members spotted at Longhorns-Jayhawks game

Can you beat the KVUE Sports team in a Texas Longhorns pick 'em? Submit your predictions here.

Ehlinger was just slightly better in crunch time. Ehlinger finished with 399 yards passing and four touchdowns. He also ran for 91 yards to save Texas on a night the program honored its 1969 national championship team with special uniforms and a halftime celebration.

The fourth quarter packed big play after big play, including a 98-yard defensive conversion when Texas returned a blocked extra point. Instead of being tied at 31, the Longhorns led 33-30 and the play only started the fireworks still to come.

Texas receiver Devin Duvernay had eight catches for 110 yards and two fourth-quarter touchdowns.

THE TAKEAWAY

Kansas: The Jayhawks came in with the worst offense in the Big 12 but they were explosive under new offensive coordinator Brent Dearmon, who was calling his first game after being promoted by Miles two weeks ago. Dearmon was coaching at NAIA program Bethel University last season but dialed up big-hit plays against the Longhorns time and time again.

RELATED: Texas Longhorns to honor 1969 National Championship team with throwback uniforms against Kansas

Texas' Roschon Johnson growing in running back role after converting from quarterback

Prince's former band, The Revolution, to headline Longhorn City Limits before Kansas Jayhawks game

Texas: The Longhorns defense came in as the worst in the Big 12 and again gave up huge chunk plays, whiffed on tackle after tackle and looked lost in coverage. The Longhorns have allowed three 100-yard rushers in the last two games.

UP NEXT

Texas plays at TCU next Saturday.