Lawrence, KS (Sports Network) - Case McCoy threw a one-yard touchdown to D.J. Grant with 12 seconds remaining, as the Texas Longhorns rallied for a 21-17 win over the Kansas Jayhawks in Big 12 action from Memorial Stadium.

McCoy replaced struggling starter David Ash in the fourth quarter and guided the Longhorns (6-2, 3-2 Big 12) on a decisive 70-yard drive in the final two minutes. Jonathan Gray led the way on the ground with 111 yards on 18 carries in the victory.

It was a gut-wrenching blow for the Jayhawks (1-7, 0-5), who have not beaten a Football Bowl Subdivision opponent since topping Northern Illinois last September, a span of 18 games. James Sims ran for a game-high 176 yards on 28 carries, but quarterback Michael Cummings finished with a mere 39 yards on 3- of-9 passing and was sacked twice.

Texas opened the scoring with a three-yard touchdown run by Joe Bergeron four minutes into the game. The TD was set up by Gray's 31-yard run three plays earlier. However, the Longhorns' subsequent drives would result in five punts, two interceptions and a turnover on downs.

KU made its move in the second quarter. Sims broke loose for a 64-yard run, and three plays later the Jayhawks made it a 7-7 game on Christian Matthews' 15-yard touchdown run at the 12:06 mark. KU took the lead on an 11-yard TD scamper by Tony Pierson midway through the frame.

After a scoreless third quarter, UT's Marquise Goodwin scored from 11 yards out on a reverse to make it a 14-14 game with 9:41 to play in regulation.

Later, the Jayhawks took a 17-14 lead on Nick Prolango's 29-yard field goal, although they left the Longhorns with nearly two and a half minutes on the clock.

Texas took advantage of that opportunity thanks to a couple of key plays. McCoy completed an 18-yard pass to Jaxon Shipley on fourth down to keep UT's hopes alive, and he later found Mike Davis for a 39-yard gain down to the Kansas 3, setting up the game-winner to Grant in the end zone.

When he exited, Ash had completed only 8-of-16 passes for 63 yards and two interceptions. Still, the Jayhawks were unable to put the game away as they finished with just 273 yards of total offense.

More From KLTD-FM