AUSTIN, Texas (AP) — TCU quarterback Max Duggan ran for the go-ahead score with 4 minutes left and the Horned Frogs’ defense made it stand with a goal-line fumble recovery to stun No. 9 Texas 33-31 Saturday in a game that had 26 penalties and ended when TCU took a safety as time ran out.

Texas looked primed for its second straight fourth-quarter comeback when Sam Ehlinger connected on a 52-yard pass to Keontay Ingram to put the Longohorns in scoring position. But Ingram fumbled on the TCU 1-yard-line with 2:32 to play.

Darwin Barlow ran 9 yards to pick up a big first down for the Horned Frogs. Duggan then took a deep snap all the way to the back of the end zone to run out the final 6 seconds.

TCU (1-1, 1-1 Big 12) is now 7-2 against Texas since joining the Big 12 in 2012. The Texas loss delivers another blow to the Big 12’s College Football Playoff hopes. The Longhorns (2-1, 1-1) and Oklahoma, who were the league’s highest ranked teams, have now dropped early home games to unranked opponents.

“Find a way. You’ve got to take ball games,” TCU coach Gary Patterson said. “Anybody we play in the state … we know their players, so our kids play hard, and our kids, their families get a chance to come to the ball games … So, you know, it’s one of those games.”

Duggan made his first start of the season after missing much of training camp while treating a previously undiagnosed heart condition. He passed for 231 yards and ran for 79 more and scored twice. His late 26-yard TD run caught the Texas defense by surprise as he had a clear path to the end zone.

Ehlinger threw four touchdown passes on an otherwise difficult day for him. Ehlinger was just 17 of 36 for 236 yards. His 14 touchdown passes in three games lead the nation.

After last week’s furious comeback win at Texas Tech, the Longhorns thought they had another when Ehlinger gave Texas its first lead with a TD throw to Malcolm Epps for their first lead. He then led Texas right back down the field after Duggan’s scoring run. Then came Ingram’s fumble.

Griffin Kell kicked four field goals for the Horned Frogs in a sloppy game by both teams with rampant penalties. The NCAA single-game record for penalties is 36, set in 1986 by Fresno State and San Jose State.

(© Copyright 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)