Virginia was originally slotted to play Florida on Friday, but the Gators pulled out of "Bubbleville" due to COVID-19 issues within their program.
It took just three days for the first top-five upset of the college basketball season.
San Francisco beat No. 4 Virginia by a single point in the final moments of the HomeLight Classic on Friday. This marked the Dons' third game in three days; they lost to UMass Lowell on Wednesday.
The last time that San Francisco beat a top-5 team was 1981.
This matchup against the Cavaliers was not on the original schedule. UVA was originally slotted to play Florida, but the Gators opted out of "Bubbleville" in Connecticut due to positive COVID-19 tests within their program.
Down three points points at halftime, San Francisco found a rhythm early in the second half.
Josh Kunen, Dzmitry Ryuny, and Jamaree Bouyea each hit a three to give the Dons four-point lead at the 16:28 mark.
The game went back and forth until there was a little over two minutes left, when San Francisco pulled ahead by seven.
The Cavaliers scored the final six points but couldn't catch unranked San Francisco. Virginia forward Sam Hauser missed a three in the closing seconds, but the reigning national champions weren't able to snag a rebound to get a tip back.