The first Sweet 16 matchup at New York's Madison Square Garden between the Kansas State Wildcats and Michigan State Spartans ended up being an overtime classic.

But only the Wildcats will be going to the Elite Eight after their 98-93 victory.

It is the 14th time in school history that the Wildcats will be heading to the Elite Eight.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Tyson Walker layup

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

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

The Wildcats did, however, have an opportunity to end it as senior guard Markquis Nowell let the ball roll past half-court before scooping it up and driving to the rack. As the clock wound down, he shot a contested lefty layup that fell short and forced the five extra minutes on the clock.

KEVIN HARLAN ADMITS HE'S ‘KIND OF EMBARRASSED’ AFTER MARCH MADNESS CLIP GOES VIRAL

In overtime, both teams traded blows with basket after basket, pushing the score to 92-92 with just under 90 seconds to go. But Kansas State finally got the stop and capitalized with a highlight-reel alley-oop from Nowell to Keyontae Johnson, who flushed it home on a reverse jam.

The Wildcats had an opportunity 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 bucket by Massoud also made NCAA history as Nowell totaled 19 assists on the night.

Keyontae Johnson dribbles

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 played perfect defense on the opposite end as Walker tried to tie things again with a three-pointer to possibly force a second overtime. Instead, Nowell stripped him as he brought the ball up and rushed it down the court for a layup at the buzzer to ice Kansas State’s victory.

Nowell finished with a double-double, tallying 20 points with his record assists as well as five steals on the defensive end. There was a time during this game, though, that Nowell's status was questionable after he injured his ankle and needed help off the court. But the Wildcats are happy he was able to check back in and come through clutch down the stretch. 

JOHN CALIPARI REACHES OUT TO WILDCATS’ MARKQUIS NOWELL AFTER ‘LITTLE KID’ COMMENT

The Wildcats’ leading scorer was Johnson, who went 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, A.J. Hoggard was an even 50% from the floor and 10 of 11 from the free-throw line for his 25 points, which led the game. He had six assists and two rebounds as well.

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

A.J. Hoggard reacts to play

A.J. 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 New York City. (Ben Solomon/NCAA Photos via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Kansas State now awaits the winner of No. 9 FAU and Tennessee, which tips off at 9:30 p.m. at The Garden. That Elite Eight matchup will be played on Saturday to see who will be going to the Final Four in Houston.