DALLAS — Kennedy Brooks took the final snap for sixth-ranked Oklahoma, after freshman quarterback Caleb Williams had taken over when Spencer Rattler was again benched in the Red River rivalry game.

Brooks ran for 217 yards and two go-ahead touchdowns in the fourth quarter, including a direct snap for a 33-yard game-winner with 3 seconds left, and the Sooners beat No. 21 Texas 55-48 on Saturday in the highest-scoring game of 117 meetings in a series that will soon move to the Southeastern Conference.

“I just ran straight and scored,” Brooks said, crediting the offensive line and the receivers blocking downfield. “Just a great call by Lincoln Riley. It’s a great play setup.”

The Sooners (6-0, 3-0 Big 12) appeared to be trying to set up for a game-ending field goal when Brooks instead broke free for a sprint to the end zone.

Oklahoma hadn’t even led until Brooks had an 18- yard TD with 7:10 left that made it 48-41. His rush was the first play from scrimmage after OU tied the game and kicked off to Xavier Worthy, who had the ball stripped away by Caleb Kelly.

The Sooners overcame a 28-7 deficit after the first quarter, matching the second-largest comeback in program history. And when it was over, Oklahoma students who were part of the sellout crowd at 92,100- seat Cotton Bowl Stadium streamed onto the field to celebrate with their team.

“I’m trying to think of the moments in my career that I’ve been prouder of a team,” Riley said. “If there’s any, it’s not many.”

Worthy had nine catches for 261 yards and two scores for the Longhorns (4- 2, 2-1), and his 31-yard TD catch tied the game with 1:23 left before the winning drive by the Sooners.

Williams ran for a 66- yard score on a fourthand-1 and completed 15 of 24 passes for 211 yards and two touchdowns after replacing Rattler, who had two turnovers in the first half that led to Texas touchdowns. Rattler did return to throw the tying 2-point conversion after Williams’ 52-yard TD pass with 7:25 left to Marvin Mims, who made a leaping catch and managed to get a toe down inbounds before falling on the pylon.

“He came in and he executed. He did what he was coached to do and that was a big help for us,” Mims, who finished with five catches for 136 yards and his first two TDs, said of Williams.

Rattler was benched early in last year’s game against Texas, but came back after halftime and threw two of his three TDs in the four overtimes the Sooners needed for a 53-45 win.

Texas led 14-0 less than two minutes into this game, getting a 75-yard catch-and-run TD by Worthy on the first play and Bijan Robinson’s 2-yard scoring run after DeMarvion Overshown’s blocked punt. There was even a fox that ran down the field and through the end zone before the Sooners had a first down.

The Longhorns, who had won three in a row since a loss to future SEC foe Arkansas in Week 2, had never lost when scoring at least 48 points. They gave up 662 total yards, and gained 516.

Longhorns quarterback Casey Thompson, whose father played for Oklahoma, was 20-of-34 passing for 388 yards and five touchdowns even with a swollen thumb that got banged early in the game. Robinson ran 20 times for 137 yards.

Gabe Brkic kicked four field goals (26, 29, 35 and 40 yards) for the Sooners, but after the last run instead kicked his fifth extra point.