AUSTIN, Texas (AP) — Headed to overtime for the second time this season, Texas coach Tom Herman gathered his offense for a pep talk.

"Just like at USC," he told them.

"Yean, except we're going to win this time," junior offensive guard Patrick Vahe shot back.

There's a new attitude at Texas under Herman and it's starting to pay off in the win column.

Texas running back Chris Warren III scored on a 2-yard touchdown run in the second overtime when the powerful running back moved a pile of Kansas State tacklers across the goal line, sending the Longhorns to 40-34 win Saturday night.

Warren appeared to be stopped short, but refused to go down and kept pushing his 250 pounds forward . Helped by a push of the pile by his teammates, Warren bowled into end zone, taking several Wildcats with him.

The touchdown came after Kansas State's Matthew McCrane missed a 53-yard field goal attempt that bounced off the left upright.

The win puts Texas (3-2) at 2-0 in the Big 12 for the first time since 2013, the last time the Longhorns played for the league crown.

"There's a lot of good energy in that locker room," said Herman, who was hired after the Longhorns had three straight losing seasons. "I'm really proud of how in the last two weeks how much we've grown up."

Freshman Sam Ehlinger passed for 380 yards and two touchdowns in his third career start for Texas. He also ran for 107 yards, using his legs for big gains on the game-tying drive in the fourth quarter and to set up Warren's game-winning score in overtime. Ehlinger even helped moved the pile.

"We got a big push and won the physical battle," Ehlinger said.

Kansas State (3-2, 1-1) quarterback Jesse Ertz threw touchdown passes of 82 and 12 yards to Dalton Schoen in the first half. But Ertz took himself out of the game after an awkward trip and fall on a short run in the third quarter. The Wildcats trailed but Alex Delton came in and ran for the tying touchdown and later drove the Wildcats to a go-ahead field goal in the fourth quarter. Delton also ran for a touchdown in the first overtime.