A crowd protests to demand a recount of votes Saturday outside the Miami-Dade Election Department in Miami. (Cristobal Herrera/EPA-EFE/Shutterstock)

Three statewide contests in Florida — including the closely watched Senate race — headed for history-making recounts, election officials confirmed Saturday, with the lead by Gov. Rick Scott (R) over Sen. Bill Nelson (D) in the marquee contest shrinking to 12,562 votes out of nearly 8.2 million cast.

The 0.15 percent margin is narrow enough to not only trigger a machine recount, which by law must be completed by Thursday, but is likely to result in a recount by hand across the state — a complicated logistical task in the nation’s biggest battleground state.

The new tally in the governor’s race was not quite as close, but it also met the threshold for a voting machine recount. Numbers posted on the state election website showed Republican Ron DeSantis leading Democrat Andrew Gillum by 33,684 votes.

President Trump immediately weighed in on Twitter, reiterating his unsubstantiated allegations of voter fraud. “Trying to STEAL two big elections in Florida! We are watching closely!”

Scott’s campaign declared a “close but decisive victory.” The governor, who has also raised allegations of fraud, used his bully pulpit Saturday to encourage Florida sheriffs to keep an eye out for any violations of election laws. Nelson has accused Scott of using the power of his office to try to secure his Senate victory.

But the claims of fraud by the president and the governor were undercut Saturday by the Florida Department of State, which said in a statement it found “no evidence of criminal activity at this time.”

Republican suspicions have centered on Democratic-leaning Broward County, Florida’s ­second-largest and the site of the “hanging chads” and other ballot irregularities during the 2000 presidential recount. The department, which oversees elections, had sent two monitors to observe Tuesday’s vote in Broward as the result of a lawsuit over the mishandling of ballots in a 2016 congressional race.

A spokeswoman for the department, Sarah Revell, said the observers were sent to “monitor the administration of the election, including visiting polling locations throughout the day as needed and observing preparation of the voting equipment and procedures for the election.” The monitors have continued to watch the vote-counting this past week.

Republicans have been sharply critical of Brenda Snipes, supervisor of elections in Broward, blaming her for the slow pace of counting ballots and citing previous problems with voting under her watch.

In a brief interview, Snipes brushed off the criticism. “It’s kind of like a hurricane, where things get really stirred up for a while and then it passes,” she said. “I don’t know when this will pass, but it will.”

On Thursday, the governor called for the Florida Department of Law Enforcement to investigate the voting in South Florida — a probe the agency has so far declined to begin because the Department of State has not presented any allegations of fraud.

The 2018 Florida recount will include three statewide contests. Secretary of State Ken ­Detzner, a Scott appointee, officially ordered recounts Saturday in the races for Senate, governor and state agriculture commissioner, setting the stage for what could be weeks of partisan warfare.

Under Florida law, a statewide machine recount is conducted when the margin of victory is less than 0.5 percent, and a manual recount is ordered if the margin is less than 0.25 percent. The governor’s race probably will not meet the manual recount standard, if Saturday’s tally holds.

Still, the news prompted Gillum, the mayor of Tallahassee, to reverse his decision to concede to the former congressman.

“Let me say clearly: I am replacing my words of concession with an uncompromised and unapologetic call that we count every single vote,” Gillum said at his campaign office Saturday afternoon.

Gillum said he was dispatching hundreds of volunteers and lawyers across the state to make sure the count is fair and accurate. The outcome of the election, Gillum said, “will have consequences beyond who wins and who loses. How we handle this election and this process will have reverberations for democracy for an entire generation of voters.”

A manual recount is of ballots in which voters skipped a race or voted for two candidates in one race. That pool of ballots will be in the tens of thousands in heavily Democratic Broward County, where nearly 25,000 ballots showed votes for governor but not senator.

Those ballots represent Nelson’s best chance to close the gap with Scott — if the machines failed to detect actual votes. But it’s possible that voters skipped the race, purposefully or by mistake. The culprit could have been the design of the ballot, in which the Senate candidates appeared in the bottom left corner, under the voting instructions.

In Broward and Palm Beach counties Saturday morning, attorneys from both parties quibbled over ballots in which the intent or eligibility of the voter was in doubt as the minutes ticked toward a noon deadline for counties to submit unofficial vote totals to the state. Scott’s narrowing lead as vote-counting continued after Election Day has provoked litigation and raucous street protests reminiscent of the contentious 2000 election.

In a sign of the heated battles to come, the three-member Broward County Canvassing Board on Saturday slogged through one ballot at a time, trying to determine if each voter was eligible and which candidates were favored — while fielding arguments from Democratic and Republican attorneys. Journalists and onlookers were on hand to observe the spectacle.

“There is a lot of grandstanding going on,” said Anthony Quackenbush, an attorney for Nelson’s campaign, cracking a joke about the speeches elections officials and attorneys gave as they litigated each ballot. “I figured I’d make a competition out of it.”

William Scherer, a Republican attorney representing Scott, held an impromptu news conference in the back of the room during a break to discuss his objections to 205 mail-in ballots that election workers had improperly opened. “Fake news, fake news!” and “Liar, liar!” some people in the crowd of about 100 people shouted. Another popular chant: “Count every vote!”

The battle is also playing out on a national level, as the Scott campaign arranged for Sen. Lindsey O. Graham (R-S.C.) to complain about the vote-counting in a call with reporters. He compared the situation in Florida to the contentious confirmation of Justice Brett M. Kavanaugh to the Supreme Court.

Graham encouraged Scott to report to Washington in the coming week for orientation for new senators, regardless of the recount. “If the recount goes, the recount goes,” Graham said.

Scott campaign manager Jackie Schutz Zeckman said the governor’s team was still working on his schedule. 

Sullivan reported from Tallahassee.