Stanford head coach David Shaw explains how special Bryce Love and K.J. Costello are after their comeback win over Oregon. (1:15)

How exactly did Stanford do that? Oregon, which had a 99 percent win probability at two times in the second half, seemingly had the game won. But some poor decision-making by the Ducks, some incredible plays by the Cardinal and a dose of luck led to one of the craziest finishes you'll ever see, a 38-31 Stanford overtime triumph.

Here are the eight plays that changed the game.

The situation: Oregon ball, 1st-and-10 at Stanford 17

The clock: 4:32 remaining, third quarter

The score: 24-7 Oregon

What happens: Oregon running back Jaylon Redd appears to score a touchdown, but he is later ruled to go out of bounds just inside the 1-yard line. But no big deal. The Ducks will punch it in on the next play and take a seemingly insurmountable 31-7 lead. Right?

The situation: Oregon ball, 3rd-and-goal at Stanford 4

The clock: 2:43 remaining, third quarter

The score: 24-7 Oregon

What happens: A bad snap sails over Oregon quarterback Justin Herbert's head. Stanford's Joey Alfieri scoops it up and runs 80 yards for a touchdown. All of a sudden, a 14-point swing has the Cardinal down just 10 points. After the game, David Shaw called it the turning point of the game.

play 0:58 Alfieri gives Stanford life with scoop-and-score A high snap goes over the head of Justin Herbert, allowing Stanford's Joey Alfieri to scoop up the ball and return it 80 yards for a touchdown.

The situation: Stanford ball, 1st-and-10 at Stanford 35

The clock: 1:17 remaining, third quarter

The score: 24-14 Oregon

What happens: After forcing a quick 3-and-out from Oregon after Alfieri's scoop-and-score, the Cardinal waste no time in getting right back on the board. Quarterback K.J. Costello hits Colby Parkinson for 11 yards, then Trenton Irwin for 32. Then superstar running back Bryce Love scores from 22 yards out. That's 65 yards in just over a minute, and all of a sudden, it's a three-point game.

The situation: Stanford ball, 1st-and-10 at Stanford 21

The clock: 4:30 remaining, fourth quarter

The score: 31-21 Oregon

What happens: After Oregon scores to make it a two-possession game, Stanford needs to score -- and quickly. Costello obliges with a three-play, 79-yard drive highlighted by a 49-yard pass to Osiris St. Brown and a 20-yard strike to Kaden Smith. Costello caps it off with a 15-yard TD pass to JJ Arcega-Whiteside with 3:10 remaining.

play 0:32 Arcega-Whiteside's TD catch inches Stanford closer Stanford QB K.J. Costello connects with JJ Arcega-Whiteside on a 15-yard touchdown pass to bring the Cardinal's deficit to 31-28 late in the fourth.

The situation: Oregon ball, 2nd-and-3 at Stanford 43

The clock: 51 seconds remaining, fourth quarter

The score: 31-28 Oregon

What happens: Oregon fans, we're so sorry. Running back CJ Verdell, fighting for extra yards, gets the ball knocked away, and Stanford recovers the fumble. What was a sure victory for the Ducks is in doubt.

play 0:44 Barton comes up with crucial fumble recovery for Stanford Oregon RB CJ Verdell rushes forward and has the ball pop loose. Stanford's Sean Barton recovers it with less than a minute left.

The situation: Stanford ball, 1st-and-10 at Oregon 14

The clock: 5 seconds remaining, fourth quarter

The score: 31-28 Oregon

What happens: After recovering Verdell's fumble, Stanford quickly marches into field goal range. Jet Toner drills the game-tying field goal as time expires to send the game, somehow, into overtime.

The situation: Stanford ball, 2nd-and-8 at Oregon 23

The clock: First overtime

The score: 31-31

What happens: Costello throws it up to the 6-foot-7 Parkinson, who taps the ball to himself and completes a circus catch in the end zone to give Stanford its first lead of the game. Autzen Stadium goes silent, but the Ducks have one more chance.

play 0:39 Parkinson tips ball to himself for TD Stanford QB K.J. Costello tosses a pass towards the end zone to Colby Parkinson, who tips the ball over a defender to secure the touchdown.

The situation: Oregon ball, 4th-and-goal at Stanford 10

The clock: First overtime

The score: 38-31 Stanford

What happens: Oregon QB Justin Herbert, who threw only two incomplete passes in regulation, misfires on his fifth pass of the extra session, as Stanford's Alameen Murphy picks off a deflected pass in the end zone to cap Stanford's miraculous comeback.