Election night in Florida saw close races in some of the biggest contests on the ballot.

Democratic nominee Andrew Gillum conceded the governor's race to Republican Ron DeSantis. Unofficial results showed Republican Rick Scott narrowly ahead of Democrat Bill Nelson in the race for Senate.

But the race for commissioner of agriculture may be the closest of all. State Rep. Matt Caldwell, R-North Fort Myers, has a victory margin of less than one-tenth of one percent, with 50.03 percent of the votes counted compared to 49.97 percent of the votes for Democrat Nikki Fried.

State law provides specific criteria and procedures for recounting votes.

The first hurdle is determining whether the recount is required. That determination can only be made when all the votes are counted.

Tallahassee election lawyer Daniel Woodring said the final results take days to determine. Final tallies must include all of the provisional ballots, in which the right of a person to cast a ballot is in question, and overseas ballots from members of the military service. The military ballots are due no later than nine days after the election.

More:Florida amendments: What passed, failed in midterm election

Only a handful of counties have finished counting provisional ballots and overseas absentee ballots can continue to be counted until 10 days after the election.

Once all the ballots are in and counted, if the margin of victory is 0.5 percent of the votes cast or less, a machine recount is ordered. The losing candidate has the right to waive the right to a recount. If that happens, there is no recount and the leading candidate wins the election.

State law provides that all of the recounts must be open to the public, and conducted under regulations set by the Florida Department of State. The rules include the time and place the recounts can be done, provisions for the recount to be open to the public and measures to assure the security of the ballots.

If the machine recount results in a margin of victory equal to or less than 0.25 percent, a second recount is ordered. The second count must be conducted by poll workers making a hand count of the ballots. The county canvassing board appoints two-person counting teams who must not be members of the same party, if possible.

But the chances of the results being reversed are low because of the number of mistakes that must be caught and the need for the overwhelming majority of miscounted ballots to benefit one side.

Woodring says experience shows a recount is not likely to change enough voted to change the result.

"Based on the recounts we are talking about in Florida, with margins of 30,000, it is extremely unlikely that recount will alter the outcome of the election when you have that type of a margin," Woodring said.

More:Election results: Bill Nelson pushes ahead with recount in Florida Senate race

It is unlikely a recount will be held without discovering errors because technology isn't perfect.

While most ballots are marked by filling an oval and counted by scanning through an optic reader, technology brings with it the modern version of the hanging chads that fueled a historic controversy over counting Florida's votes in the Bush-Gore presidential race in 2000.

Instead of punch cards that aren't completely punched, modern ballots may have ovals that are not entirely filed in. The result is a machine may or may not pick up a particular vote on one pass, but it might catch it on another.

Challenges by candidates' representatives are more likely in the hand recount than when the machine is doing the counting because it is impossible to raise an issue with an individual ballot going through a machine, while questions can be raised in a manual count when each ballot is viewed separately.

In Gillum's case, the numbers Thursday morning showed him with 4,023,125 votes to DeSantis' 4,066,058, a margin of .52 percent, close to the automatic recount trigger.

Nelson's campaign also said that race is headed for a recount with a difference of 21,888 votes between the Senator and challenger Scott, a difference of .26 percent.

More:Election results: Florida and Lee winners in the Nov. 6 midterm election

Looking ahead to a possible recount, the next step is for county supervisors of elections to recheck their vote tally and for campaigns by noon Saturday to contact voters whose ballots weren't counted due to lack of ID or other issues.

Then the state will calculate the final results and percentages for every race and issue a determination of whether a recount is needed.

That there is even talk about a recount underscores the importance of each vote

"Realistically, Florida is a state where elections are often decided by a percentage point or so — its a diverse state with a significant number of voters," Woodring said. "In a way as Floridians, we're fortunate, votes in Florida usually really make a difference as opposed to states where votes cast by one party or the other don't make a difference because votes cast one way or the other don't really make a difference.

It's close. Real close:A closer look at the how close the too-close-to-call Florida Senate race

Is Andrew Gillum's concession legally binding?

Gillum conceded his race in a tearful speech Tuesday, but there were no concession speeches in the two other potential recount races. In 2000, Al Gore conceded to George W. Bush, but it didn't halt the automatic recount when the margin was .03 percent.

The speeches are not legally binding and are simply a courtesy gesture to respecting the vote and democratic process.

Nate Chute is a producer with the USA Today Network. Follow him on Twitter at @nchute.

Florida governor race:Why Andrew Gillum's loss to Ron DeSantis is historic

Florida amendments:What passed, failed on Tuesday