GLENDALE, Ariz. — Oklahoma State was a step slow in the first half, appearing to be stuck in the desert sand while Notre Dame raced around the field.
A quick scoring drive just before halftime gave the No. 9 Cowboys a spark and they rode it one of the biggest victories in school history.
Led by Spencer Sanders, Oklahoma State pulled off the biggest comeback in Fiesta Bowl history, overcoming a 21-point deficit to beat No. 5 Notre Dame 37-35 on Saturday.
Sanders accounted for 496 yards and threw three of his four touchdown passes to Tay Martin, including a 9-yarder to cap a four-play, 75-yard drive just before halftime.
"Us going down and scoring quickly just before the half, that gave us hope," Oklahoma State Mike Gundy said. "That gave us a chance as coaches to say, 'Guys, we're fine.'"
Oklahoma State (12-2, No. 9 CFP) came up inches short of securing a College Football Playoff spot in a loss to No. 6 Baylor at the Big 12 title game and fell into 21-point, first-half hole against Notre Dame (11-2, No. 5 CFP).
Jack Coan led Notre Dame's early charge while throwing for a Fiesta Bowl-record 509 yards and five touchdowns.
Sanders and Martin brought the Cowboys back.
Sanders, who had a 9-yard touchdown pass to Jaden Bray in the first quarter, cut Notre Dame's lead to 28-14 with a 9-yard scoring pass to Martin with 37 seconds left in the first half. The pair connected for two more touchdowns, from 5 and 8 yards, to tie the game, and the Cowboys went up 34-28 on three field goals by Tanner Brown.
Sanders threw for 371 yards on 34-of-51 passing and ran for 125 yards after throwing four interceptions in the Big 12 title game. He's the second player in FBS history with 350 yards passing, 100 rushing yards and four passing touchdowns in a bowl game, joining Clemson's Tajh Boyd in the 2014 Orange Bowl.
"One the game down to on, it was anybody's game and we just decided to pull a little harder," Sanders said.
Notre Dame still had a chance.
The Irish forced two fumbles deep in their own end, but turned the ball over on downs at the 15 and Brown kicked a 25-yard field goal
Coan threw a 25-yard TD pass to Kevin Austin with 1:05 left to pull Notre Dame within two, but Oklahoma State recovered the onside kick to keep the Irish winless in major bowl games since the 1993 Cotton Bowl under Lou Holtz.
"In the first half, we scored 28 points, we're moving the ball, we're protecting the quarterback and obviously things didn't go that way in the second half," Notre Dame coach Marcus Freeman said after his head coaching debut. "We have to go back a see what the defense did schematically to give us some issues and try find a way to make sure that never happens again."
The Irish appeared to be headed toward a rousing start to the Freeman era, building a 28-7 lead behind Coan. Notre Dame's senior quarterback threw for 342 yards and four touchdowns in the first half, including two to tight end Michael Mayer.
All the momentum came to a thudding halt in the second half.
Oklahoma State ramped up the pressure on Coan and shut down Notre Dame's offense while its offense was revving up.
Notre Dame finally got something going midway through the fourth quarter, but Malcolm Rodriguez stepped in front of Austin for an interception at the Cowboys' 18-yard line.
"It was a lot of yards, but all I really care about at the end of the day is winning," said Coan, who finished 38 for 68. "I wish I could have done more to help the team."
Notre Dame's latest loss in a major bowl is going to sting for a while. The Irish looked like their argument to have been in the CFP was valid in a dominating first half, only to fall flat in the second.
A monster turnaround after a flat start gave Oklahoma State its first major bowl win since the 2011 Fiesta Bowl.
Notre Dame: The Irish will have to replace Coan and Williams on offense, but Mayer, their leading receiver, is a sophomore. DT Kurt Hinish is out of eligibility and pass rushing specialist Isaiah Foskey is planning decided whether to leave for the NFL by Jan. 17.
Oklahoma State: Sanders still has eligibility left, but the Cowboys will have to replace Warren, Martin, RB Dezmon Jackson and OL Josh Sills.
More AP college football: https://apnews.com/Collegefootball and https://twitter.com/AP_Top25.