The 12th-seeded Liberty Flames will keep dancing after rallying to upset the fifth-seeded Mississippi State Bulldogs 80-76 in San Jose, California, on Friday.

It marks the first NCAA men's basketball tournament victory in program history for the Lynchburg, Virginia, school.

Caleb Homesley led the way for the Flames with 30 points, and Lovell Cabbil Jr. (18 points) played the role of hero with a go-ahead three-pointer late.

Quinndary Weatherspoonhad 27points in a losing effort for the Bulldogs, with Lamar Peters contributing 21points.

Early on, it was the Weatherspoon and Peters show, as the two guards powered the Bulldogs to an early lead by combining to score the team's first 13 points. But a balanced effort helped the Flames keep pace.

Mississippi State led for the first 14-plus minutes, with the lead stretching to six on multiple occasions. But Liberty stayed within striking distance.

Then, with just more than five minutes to play in the opening half, the Flames took their first lead of the game:

NCAA March Madness @marchmadness

FIRST LEAD FOR THE FLAMES! 🔥
Liberty up, 26-24
#MarchMadness https://t.co/fOxo9Pkp5d

Following their hot start, Weatherspoon and Peters were held scoreless for a five-minute stretch late in the half. They did, however, close out the half on a strong note.

The back-and-forth affair continued early in the second half, with neither team able to create much separation early on. For the Bulldogs, it was more of the same, with Weatherspoon and Peters dominating on offense.

Ben Portnoy @bportnoy15

Weatherspoon has looked the part of a senior leader in this one. Driving hard to the hoop and getting himself to the line. He's attacked the basket aggressively today.

While the dynamic duo led the Bulldogs for most of the night, freshman Robert Woodard also got in on the action:

CBS Sports @CBSSports

.@HailStateMBK, you are cleared for takeoff. 🚀 https://t.co/Xc5AD674mM

Mississippi State would grab a double-digit lead shortly thereafter, but Liberty refused to back down.

In fact, the Flames rallied to retake the lead with less than three minutes to play.

NCAA March Madness @marchmadness

FLAMES OUT FRONT 🔥
#MarchMadness https://t.co/SFlfUeTyzT

That would set the stage for madness—and for Cabbil Jr. to create a signature March moment:

NCAA March Madness @marchmadness

MARCHHHHH‼️
Liberty up 2! #MarchMadness https://t.co/orhhC3jwRI

Liberty would go on to make eight of 10 free-throw attempts in the final 50 seconds, going a perfect 6-of-6 in the final 15 seconds to ice the game. With that, it notched a historic victory.

In a tournament that has had very little drama at the end of games, this matchup provided quite a finish. It featured six ties and nine lead changes.

As good as Weatherspoon and Peters were, they just didn't have enough help to hold off the Homesley-led Flames.

Jeff Borzello @jeffborzello

These Mississippi State guards can go, man. Lamar Peters and Quinndary Weatherspoon carrying the Bulldogs offensively.

Ultimately, Mississippi State's inability to guard the three-ball cost the Bulldogs the game. Liberty drained 12 shots from behind the arc, with Homesley recording five on his own. And of course, Cabbill's shot proved to be the difference-maker.

With the victory, the Flames became the third No. 12 seed to upset a No. 5 seed this year, joining Murray State and Oregon. Per ESPN Stats and Info, this marks the first time since 2014 that three No. 12 seeds advanced to the round of 32:

ESPN Stats & Info @ESPNStatsInfo

(12) Liberty gets the upset win over (5) Mississippi State 80-76.
This is the 5th time that three 12 seeds defeated 5 seeds in the Round of 64 since the NCAA Tournament expanded to 64 teams in 1985.
It also happened in 2014, 2013, 2009 and 2002. https://t.co/z4Ba9Blgld

Auburn, which defeated New Mexico State by one point on Thursday, was the lone fifth seed to survive the dangerous matchup.

What's Next

Liberty advances to the second round on Sunday, when it will take on the winner of Friday's game between No. 4 Virginia Tech and No. 13 St. Louis for a spot in the Sweet 16.