Barry Brown #5 of the Kansas State Wildcats lays up...

Barry Brown #5 of the Kansas State Wildcats lays up a shot against the UMBC Retrievers during the second round of the 2018 NCAA Men's Basketball Tournament at Spectrum Center on March 18, 2018 in Charlotte, North Carolina. Credit: Getty Images / Streeter Lecka

CHARLOTTE, N.C. — The ultimate underdog story is over, but this NCAA Tournament will always be remembered for the sweetest No. 16 in college basketball history.

UMBC’s brief but historic run ended with a 50-43 loss to ninth-seeded Kansas State on Sunday night in the South Regional.

UMBC became the first 16 seed to beat a No. 1, destroying top-ranked Virginia by 20 points Friday night. After pulling off an all-time sports stunner, the Retrievers ran out of magic against the Wildcats.

“I’m proud of my guys, man,” UMBC senior guard Jourdan Grant said. “We made history. Can’t be mad at that. I wouldn’t want to go out with another set of guys, man. I love these guys to the moon and back. This season, we’ll remember it for the rest of our lives.”

As Ryan Odom emptied his bench with 9.4 seconds left, the crowd gave the Retrievers a standing ovation. The players hugged at midcourt. After the game, players walked to the side of the court and gave their fans an appreciative wave.

The dream had ended, but some players managed smiles as they left the court.

“(UMBC) played their hearts out,” Kansas State coach Bruce Weber said. “UMBC, you’ve got to give Coach Odom credit. What they did to Virginia was unbelievable.”

Barry Brown led Kansas State with 18 points and Xavier Sneed came up with some huge plays down the stretch, including a monster dunk off an offensive rebound.

The Wildcats (24-11) move on to the Sweet 16 for the first time since 2010, when they lost in the Elite Eight to Butler. They will face No. 5 Kentucky on Thursday night.

UMBC had only two field goals in the final six minutes and shot just 29.8 percent for the game.

UMBC’s scrappy defense forced 18 turnovers but managed just three points off those. They went 6-for-22 from 3-point range two nights after lighting up Virginia. And 9-for-18 from the free throw line.

“This entire week has been amazing up until the last two hours,” UMBC guard Joe Sherburne said. “We connected with people around the world. We could tell during the game how many people were rooting for us.”

K.J. Maura, the 5-8 point guard, said: “We put our name on the map. We gave hope to smaller seeds.”

And earned the admiration of their opponents. Brown made sure to congratulate the Retrievers.

“I think they just needed to hear they had a great run — and what they did was history,” Brown said. “I just wanted to tell each and every one of them ‘You’re a great player, good job,’ and just give them the credit. They earned it.”

Maybe the Spectrum Center was simply done giving up upsets. Earlier, defending national champion and No. 2 seed North Carolina was throttled by seventh-seeded Texas A&M.

Not that UMBC didn’t give it a try.

The Retrievers (25-11) had a chance to take the lead with five minutes remaining, but Arkel Lamar was stripped of the ball on a drive to the lane and Sneed took the ball the length of the floor for a two-handed dunk. Brown then hit a fallaway jumper.

Sneed, who had eight points, then skied above the rim and jammed home an offensive rebound, even bringing the pro-UMBC crowd to its feet. Makol Mawien added a dunk on a fast break to seal the victory with 45 seconds left.

“It just gave us a lot of energy and a boost to show we could win this game,” the 6-5 Sneed said of his dunk, where he elevated so high the top of his head was almost level to the rim.

The Retrievers showed no sign of a letdown early on, jumping out to a 7-0 lead after Kansas State missed its first eight shots, five from beyond the arc.

Kansas State didn’t score until the 13:40 mark of the first half, but the Wildcats closed the half on a 17-8 run and led 25-20 at the break despite going 0-for-8 from three-point range.

“What I said in the huddle was keep guarding, keep being persistent,” Weber said. “And then Xavier made some plays down the stretch. We just shut them out.”