Central Michigan defeats Oklahoma State on a miracle play, which consisted of a Hail Mary and a lateral, as the clock expired. (1:08)

In one of the craziest endings you'll ever see, Central Michigan pulled the shocker of Week 2.

With a Hail Mary and a lateral on one final untimed -- and controversial -- down, the Chippewas upset No. 22 Oklahoma State 30-27 on Saturday at Boone Pickens Stadium in Stillwater, Oklahoma.

The Cowboys led the game 27-24 with four seconds left and decided to throw the ball in the air on fourth down to run out the final seconds of the game. The only problem was that no receivers ran a route and quarterback Mason Rudolph simply threw the ball out of bounds. Rudolph was flagged for intentional grounding and the officials awarded Central Michigan one untimed down from their 49-yard line.

Amari Coleman (7) and Central Michigan celebrated after a last-second Hail Mary and lateral resulted in the game-winning touchdown at Oklahoma State. J Pat Carter/Getty Images

That's when the Chippewas pulled off a play we'll be talking about for a long time: Quarterback Cooper Rush threw a 42-yard pass to receiver Jesse Kroll, who immediately lateraled to trailing receiver Corey Willis, who took the pitch, ran all the way to the opposite side of the field and outraced Oklahoma State defenders to the goal line for the win.

The only problem is the Chippewas should never have even been given the chance to complete their miracle ending. According to the NCAA football rule book, in rule 3, section 2, article 3.1, "A period shall be extended for an untimed down if ... a penalty is accepted for a live-ball foul(s). Exception: Rule 10-2-5-a: The period is not extended if the foul is by the team in possession and the statement of the penalty includes loss of down."

So according to that rule, the game should have ended and an untimed down shouldn't have been awarded. Mid-American Conference referee Tim O'Dey acknowledged after the game that Central Michigan was wrongly awarded an untimed down.

Regardless, it's a huge win for the Chippewas and second-year head coach John Bonagmego to go on the road and score a win over a top-25 team.

For Oklahoma State, it's an indictment on the Cowboys' ability to hold serve against a team they should have been ready for.

Most Improbable Comebacks Last 5 Seasons Year Leader Opponent Min. win probability 2014 UCF East Carolina 0.06% 2015 Miami (FL) Duke 0.08% 2015 Michigan State Michigan 0.2% 2014 Georgia Tech Georgia 0.2% 2016 Central Michigan Oklahoma St 0.3% Based on lowest win probability in a game

These Chippewas were not some random Group of 5 conference team that Oklahoma State figured it could walk over. This is the same Central Michigan squad -- with the same stellar quarterback -- that the Cowboys had to fight hard to beat in Mount Pleasant, Michigan, a year ago. The Cowboys went deep into the fourth quarter of that game clinging to only a 4-point lead before escaping with a 24-13 win.

Rush, the NCAA's active career leader in passing yards and total offense, wasn't going to be fazed walking into Boone Pickens Stadium on Saturday. The senior, who made his 38th consecutive start, has played at Power 5 venues before: Rush and the Chippewas played at Michigan State and at Syracuse last season.

Instead, poor third down success (Oklahoma State was 1 of 11 on third downs) and a nonexistent running game kept the Cowboys from putting away a game they should have been able to, considering how well the defense played in the first three quarters, keeping Rush and Co. in check.

The Chippewas, on the other hand, were an impressive 8-of-15 on third down and took their first lead on a third-and-13 situation when Rush hit Devon Spalding for a 31-yard touchdown pass midway through the fourth quarter.

All that said, the Cowboys were in front when the clock hit triple zeroes -- initially -- and they have a legitimate argument for none of the above mattering because the aforementioned rule appears to have been incorrectly enforced.

The dramatic ending will have people talking for quite some time.