Florida’s secretary of state announced Saturday that there will be recounts in the Senate and gubernatorial races after the races became tight enough to trigger them -- amid controversy over the handling of the counts, with President Trump warning that he will be "watching closely."

Secretary Ken Detzner issued the order after the unofficial results in both races fell within the margin that by law triggers a recount. The results of the machine recount will be due by 3 p.m. ET this coming Thursday. The votes in the Senate race between Democratic Sen. Bill Nelson and Republican Gov. Rick Scott, and the gubernatorial race between Republican Rep. Ron DeSantis and Democratic mayor of Tallahassee Andrew Gillum, will be recounted. There will also be a recount for the race for agriculture commissioner.

Election officials in Miami-Dade County said they launched a "machine recount" Saturday evening, meaning they were loading paper ballots into scanning machines. The processing of some 800,000 ballots could take several days, the Associated Press reported.

Earlier Saturday, 266 stray ballots from a mail sorting facility in Opa-locka arrived at Miami-Dade's Elections Department, a spokeswoman for the department told the Miami Herald on Saturday evening. But the Opa-locka ballots won't be counted because Florida law says that mail-in ballots can be counted only if they arrive by the time that polls close on Election Day, the newspaper reported.

Miami-Dade had received some 15,000 mail ballots Tuesday while conventional voters were at the polls, the report said.

On Saturday morning, a group of protesters outside the Miami-Dade agency's offices demanded that all ballots be counted, regardless of when they were received, the Herald reported.

In Florida, a mandatory recount occurs if the winning candidate’s margin is less than 0.5 percent. If the margin is less than 0.25 percent, the recount must be done by hand.

NEWT GINGRICH: AS DEMOCRATS TRY TO STEAL ELECTIONS, THEIR DISHONESTY THREATENS THE VERY FABRIC OF OUR COUNTRY

Both Scott and DeSantis led their races after the midterms on Tuesday, with Gillum conceding to DeSantis. But as the days went on, and more votes were counted, those leads have all but disappeared.

Scott’s lead by Saturday afternoon was reduced to 0.15 percent and DeSantis’ was 0.41 percent.

The shrinking leads quickly led to suspicions from Republicans that foul play was afoot in Democratic strongholds of Broward and Palm Beach counties. Democrats, meanwhile, have accused Republicans of trying to stop all votes from being counted. President Trump on Saturday told reporters that “they are finding votes out of nowhere.”

"What's going on in Florida is a disgrace," he said.

He reacted within moments to the announcement of the recounts by accusing Democrats of "trying to steal two big elections in Florida!"

"We are watching closely!" he added.

Scott had asked the Florida Department of Law Enforcement to investigate the counties’ election departments, but a spokeswoman told the Associated Press there would be no investigation as there was no credible allegation of fraud.

Gillum welcomed the recount in a news conference on Saturday.

"I am replacing my words of concessions with an uncompromising and unapologetic call that we count every single vote," he told reporters. He also called for calm, and said he was prepared to accept "whatever the outcome of this election so far as every single vote...is counted."

Scott took to Twitter on Saturday evening, revealing that "7,500 volunteer recount representatives" were at the ready in Florida.

"Reps will be deployed all over FL to make sure any potential issues are reported so they can be quickly reviewed and resolved," he tweeted. "We won't allow unethical liberals to steal this election!"

In a sign of the turmoil that could ensue, protesters gathered outside the Broward elections office ahead of the announcement. Broward in particular has long been the source of election controversies. In 2016, Republican poll watchers complained that staff was opening absentee ballots in private, thereby making it impossible for groups to question whether ballots were cast, according to Politico. The GOP sued in 2017 to make sure Election Supervisor Brenda Snipes followed the law.

BALLOT MIXUP PUTS MORE HEAT ON BROWARD ELECTIONS OFFICIAL AS KEY FLORIDA RACES REMAIN UNRESOLVED

On Friday, the Miami Herald reported that there were invalid ballots mixed in with about 200 valid ones, but not solution was immediately found for the problem.

Fox News' Elizabeth Zwirz and Dom Calicchio and the Associated Press contributed to this report.