The BYU Cougars picked up a thrilling victory at home against the Oklahoma State Cowboys on Friday night to remain undefeated against Big 12 Conference opponents.

The No. 13 Cougars had the ball on the Oklahoma State 35-yard line and trailed 35-31 with 19 seconds left. Jake Retzlaff dropped back to pass, went through his progressions in the pocket and found wide receiver Darius Lassiter open for a split second. Lassiter made the catch, broke two tackles and scored the go-ahead touchdown.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Jake Rezlaff and Darius Lassiter

BYU wide receiver Darius Lassiter (5) and quarterback Jake Retzlaff (12) celebrate after Retzlaff ran for a touchdown in the first half of an NCAA college football game against Oklahoma State, Friday, Oct. 18, 2024, in Provo, Utah.  (AP Photo/Spenser Heaps)

BYU fans erupted in delight as Lassiter and the team celebrated the touchdown. The Cougars held on for the 38-35 victory.

"It’s magical. It’s spiritual," Retzlaff said. "How can you not be romantic about this game?"

Retzlaff was 13-of-26 with 218 passing yards, two touchdown passes and two interceptions. He also ran for 81 yards and scored a touchdown on the ground. 

He threw his first touchdown pass to Keelan Marion with 3:43 left in the third quarter. BYU took the lead on that drive.

COLORADO'S TRAVIS HUNTER ARGUES PLAYING 'BOTH WAYS' FOR HEISMAN OVER BOISE STATE'S ASHTON JEANTY

LJ Martin celebrates

BYU running back L.J. Martin, second from left, celebrates after scoring a touchdown in the second half of an NCAA college football game against Oklahoma State, Friday, Oct. 18, 2024, in Provo, Utah.  (AP Photo/Spenser Heaps)

Oklahoma State quarterback Alan Bowman and wide receiver Brennan Presley threw touchdowns to each other in the fourth quarter. Presley found Bowman for a 16-yard touchdown to tie the game. After BYU kicked a field goal, Bowman returned the favor on a six-yard touchdown pass with 1:13 left in the game.

The Cowboys’ defense just couldn’t pull through.

"It was uncharacteristic of what you see from our defense," BYU coach Kalani Sitake said. "I thought we freelanced a little bit for the sake of trying to make the big play."

Cougars running back L.J. Martin had 120 yards on the ground and scored twice. Lassiter had six catches for 1,289 yards.

Alan Bowman throws

Oklahoma State quarterback Alan Bowman passes in the second half of an NCAA college football game against BYU, Friday, Oct. 18, 2024, in Provo, Utah.  (AP Photo/Spenser Heaps)

CLICK HERE TO GET THE FOX NEWS APP

BYU moved to 7-0 on the season with the win. Oklahoma State is 3-4.

The Associated Press contributed to this report.

Follow Fox News Digital’s sports coverage on X, and subscribe to the Fox News Sports Huddle newsletter.