NORMAN, Okla. (AP) Dillon Gabriel said earlier in the week that Oklahoma would have its hands full with his former team. He was right.

Gabriel threw three touchdown passes, Oklahoma stopped a two-point attempt in the closing minutes and his No. 6 Sooners held on to beat UCF 31-29 on Saturday.

Gabriel, who transferred to Oklahoma before the 2022 season, connected on 25 of 38 passes for 253 yards. He helped the Sooners rally from a 23-17 deficit in the third quarter to defeat the Knights and his former coach, Gus Malzahn.

“It definitely was a personal one because I played there and it’s just it’s a part of my journey that I’ll never forget,” Gabriel said. “But, at the end of the day, it wasn’t about me. It was about us as a team finding a way to win.”

Nic Anderson caught five passes for 105 yards and two touchdowns and Drake Stoops caught seven passes for 60 yards and a score for the Sooners (7-0, 4-0 Big 12).

John Rhys Plumlee, who missed most of the past month with a leg injury, passed for 248 yards and two touchdowns for UCF. Javon Baker had five catches for 134 yards and two touchdowns and RJ Harvey ran for 101 yards for the Knights (3-4, 0-4), who are still seeking their first Big 12 win after leaving the American Athletic Conference.

The Knights had lost three straight, and Malzahn said 13 people in the program had to get intravenous fluids on Saturday morning because of illness. He said after the game he doesn't believe in moral victories, but he appreciated his team's effort.

“I’m extremely proud of our team, the way they fought," Malzahn said. “You know, we were right there in the middle of it in the fourth quarter against one of the best teams in the country.”

With Oklahoma leading 7-0 early in the second quarter, the Sooners appeared to have a goal-line stand, but an unsportsmanlike conduct penalty against linebacker Jaren Kanak gave the Knights a first down. Plumlee scored on the next play to tie the game.

Oklahoma pulled ahead 14-10 on a 42-yard pass from Gabriel to Anderson, but UCF answered 27 seconds later with an 86-yard touchdown pass from Plumlee to Baker.

Oklahoma's Zach Schmit made a 25-yard field goal to close the half after missing his first two attempts, tying the game at 17. UCF took a 23-17 lead into the fourth quarter.

Gabriel's swing pass to Drake Stoops went for a 11-yard touchdown to tie the game, and Schmit's extra point put the Sooners up 24-23. Oklahoma's Gavin Sawchuk and Marcus Major combined for 49 yards on five carries on the drive.

Sawchuk's 30-yard touchdown run on the next Oklahoma possession put the Sooners up 31-23 with 3:13 to play.

UCF responded with Baker scoring on a 12-yard touchdown reception with 1:16 remaining. The Knights went for a two-point conversion that could have tied the game. UCF's Xavier Townsend caught a backward pass and was looking to throw, but Oklahoma's Kendal Dolby dragged him down for a loss.

“It’s a play that we worked in all the way back in fall camp,” Malzahn said. "Obviously, when a play like that doesn’t work, I mean you get questions. But at the time, we felt really good about it.”

Oklahoma's Austin Stogner recovered UCF's onside kick, and the Sooners ran out the clock.

Despite numerous errors, Oklahoma's goals of a spot in the Big 12 title game and a College Football Playoff bid remain reachable.

“We were fortunate to win the game,” coach Brent Venables said. “We made enough mistakes today to lose.”

POLL IMPLICATIONS

The Sooners were heavily favored and probably will slip a few spots despite holding on for the win.

THE TAKEAWAY

UCF: The Knights were just a few plays away, and Plumlee looked solid in his return. A defense that had been shredded for much of the season put up a valiant effort.

Oklahoma: The Sooners figured out a way to hold on after making so many early mistakes. The Sooners pounded out 132 yards on 27 carries in the second half to create balance.

FLIPPING THE SCRIPT

Oklahoma had struggled at times with its run game this season, but it gained 189 yards on 46 attempts on Saturday. Major had 82 yards on 18 carries and Sawchuk had 63 yards on 10 carries.

Meanwhile, the Sooners held the nation’s No. 3 rushing offense to 149 yards on 41 carries. UCF entered the game averaging 246.3 yards per game on the ground.

STAT LINES

Oklahoma has allowed 74 points in the first half of games this season, but just 39 in the second.

UP NEXT

UCF: Hosts West Virginia on Saturday.

Oklahoma: Visits Kansas on Saturday.

--- Get alerts on the latest AP Top 25 poll throughout the season. Sign up here --- AP college football: https://apnews.com/hub/ap-top-25-college-football-poll and https://apnews.com/hub/college-football

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.