The Florida Senate race — the country's most expensive contest this year and one of its most bitter — was too close to call early Wednesday with a potential recount ahead, according to NBC News projections.

Florida's Republican Gov. Rick Scott led Democratic Sen. Bill Nelson by less than half a percentage point with nearly all votes counted. The margin, if it sticks, would trigger a mandatory recount in the state. It could take until Saturday to determine whether a recount takes place.

Scott piled more than $50 million of his own money into the race. Both sides saturated the airwaves with attacks ads, treating Florida voters to one of the most rancorous races of the 2018 midterms. In their one and only debate, Scott, who is leaving the governor's office because of term limits, slammed Nelson by saying he had accomplished little during his decades in the Senate on issues ranging from the environment to immigration to Cuba relations.

Watch: Florida re-enfranchises more than 1 million former felons