The first Sweet 16 matchup against Madison Square Garden between the Kansas State Wildcats and Michigan State Spartans ended up being an overtime classic.

But only the Wildcats will go to the Elite Eight after their 98-93 win.

It marks the 14th time in school history that the Wildcats will head to the Elite Eight.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Tyson Walker #2 of the Michigan State Spartans shoots the ball against the Kansas State Wildcats during the first half of the Sweet 16 round game of the NCAA Men’s Basketball Tournament at Madison Square Garden on March 23, 2022 in New York City. York. (Al Bello/Getty Images)

Spartans star guard Tyson Walker drove to his left and scored the game-tying layup with five seconds left on the clock in the second half, bringing the score to 82-82.

The Wildcats, however, had a chance to finish it off, as senior guard Markquis Nowell let the ball go past half court before picking it up and driving it onto the rack. As the clock ticked down, he hit a contested left-handed layup that fell short and forced an extra five minutes on the clock.

KEVIN HARLAN ADMITS HE IS ‘SHAMELY’ AFTER MARCH MADNESS CLIP GOES VIRAL

In overtime, both teams traded shots basket after basket, pushing the score to 92-92 with just under 90 seconds to go. But Kansas State eventually stopped and took advantage with a standout alley-oop from Nowell to Keyontae Johnson, who drove it home in a reverse jam.

The Wildcats had a chance to pull away a bit with 17.8 seconds left, when Nowell found Ismael Massoud for a long two-point jumper to make it 96-93.

That Massoud basket also made NCAA history, as Nowell totaled 19 assists on the night.

Keyontae Johnson #11 of the Kansas State Wildcats brings the ball up court against the Kentucky Wildcats in the second round of the NCAA Men's Basketball Tournament at The Fieldhouse at Greensboro Coliseum on March 19, 2023 in Greensboro, North Carolina.

Keyontae Johnson #11 of the Kansas State Wildcats brings the ball up court against the Kentucky Wildcats in the second round of the NCAA Men’s Basketball Tournament at The Fieldhouse at Greensboro Coliseum on March 19, 2023 in Greensboro, North Carolina. (Jacob Kupferman/Getty Images)

Nowell, then, played perfect defense on the opposite end, as Walker tried to tie things up again with a 3-pointer to possibly force a second overtime. Instead, Nowell stripped him as he picked up the ball and lobbed it down the court for a layup at the buzzer to ice Kansas State’s win.

Nowell finished with a double-double, adding 20 points on his record assists and five steals on defense. However, there was a time during this game when Nowel’s condition was questionable after he injured his ankle and needed help off the pitch. But the Wildcats are glad he was able to re-register and pull through down the stretch.

JOHN CALIPARI CLOSES UP TO WILDCATS’ MARKQUIS NOWELL AFTER ‘LITTLE BOY’ COMMENT

The Wildcats’ leading scorer was Johnson, who was 10 of 18 from the field for 22 points with six boards and one assist. Massoud also dropped 15 points off the bench.

For the Spartans, AJ Hoggard was even 50-50 from the field and 10-of-11 from the free throw line for his game-leading 25 points. He also had six assists and two rebounds.

Walker finished with 16 points on 6-of-16 from the field, while Joey Hauser was 5-of-11, including 4-of-9 from 3-point ground, for 18 points.

AJ Hoggard #11 of the Michigan State Spartans reacts during the first half of the game against the Kansas State Wildcats during the Sweet Sixteen round of the 2023 NCAA Men's Basketball Tournament held at Madison Square Garden on March 23, 2023 in the city from New York.

AJ Hoggard #11 of the Michigan State Spartans reacts during the first half of the game against the Kansas State Wildcats during the Sweet Sixteen round of the 2023 NCAA Men’s Basketball Tournament held at Madison Square Garden on March 23, 2023 in the city from New York. (Photos by Ben Solomon/NCAA via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Kansas State will now await the winner of No. 9 FAU and Tennessee, which begins at 9:30 pm at The Garden. That Elite Eight matchup will be played on Saturday to see who will go to the Final Four in Houston.