(Reuters) - Florida will hold a machine recount of votes in its neck-and-neck races for the U.S. Senate and governor, officials said on Saturday, setting up a days-long wait for closure in two of the most closely-watched contests of the midterm elections.

Results of the recount are due by 3 p.m. (2000 GMT) Thursday for the two races, which along with those for governor in Georgia and for the U.S. Senate in Arizona, are the most high-profile contests still undecided after Tuesday’s vote.

The drama echoed the 2000 presidential vote recount that took place in Florida, with both sides alleging foul play and sending teams of lawyers to the Sunshine State.

In Florida’s election for the U.S. Senate, Republican Governor Rick Scott had seen his lead narrow over incumbent Democratic U.S. Senator Bill Nelson to about 12,500 votes, or 0.15 percent, by Saturday evening.

Scott urged every sheriff in the state to watch for any violations during the recount process and to take appropriate actions.

“We will not let unethical liberals steal this election!” Scott wrote on Twitter. “It’s time Senator Nelson accepts these results and allows the state of Florida to move forward to a better future.”

Nelson said his campaign would continue taking action to ensure every vote is counted without interference or efforts to undermine the democratic process.

“We believe when every legal ballot is counted we’ll win this election,” Nelson said in a statement.

In the gubernatorial contest, Republican Ron DeSantis’ lead over Democrat Andrew Gillum winnowed to about 33,700 votes, or 0.41 percent.

FILE PHOTO: U.S. Senator Bill Nelson speaks in Orlando, Florida, U.S., June 12, 2016 and Florida Governor Rick Scott appears in Washington, DC, U.S., September 29, 2017 respectively. REUTERS/Kevin Kolczynski and REUTERS/Joshua Roberts/File Photos

DeSantis said in a video statement that the results were “clear and unambiguous, just as they were on election night,” and that he was honored by the trust Floridians placed in him.

“It is important that everyone involved in the election process strictly adhere to the rule of law which is the foundation for our nation,” DeSantis said.

Gillum, who is trying become Florida’s first African-American governor, told reporters his team has organized a cadre of hundreds of volunteers and lawyers to move across the state and fight against voter suppression and for a fair count.

“Let me say clearly: I am replacing my words of concession with an uncompromised and unapologetic call that we count every vote,” Gillum said at a news conference.

ECHOES OF 2000 RECOUNT

Accusations of fraud and lawsuits have emerged over the Florida contests in recent days, conjuring memories of the state’s 2000 presidential vote recount. In that election, the winner of the White House hung in the balance for weeks before the U.S. Supreme Court stopped the counting and Republican George W. Bush triumphed over Democrat Al Gore.

President Donald Trump has accused Democratic election officials in Florida’s Broward and Palm Beach Counties of corruption, without providing any evidence.

“Trying to STEAL two big elections in Florida! We are watching closely!” Trump wrote on Twitter on Saturday during a visit to France.

Scott has filed lawsuits against Democratic election supervisors in the two counties, accusing them of violating election law and demanding access to their vote tallies.

Nelson also filed a motion in federal court asking that provisional and absentee ballots not be rejected because election officials deem that the signatures do not match voters’ signatures on file.

Trump has noted the involvement of Nelson’s lawyer, Marc Elias, a Washington-based Democrat who represented Hillary Clinton during her 2016 presidential race, describing him on Twitter as the Democrats’ “best election stealing lawyer.”

Elias has had a role in many of the nation’s most prominent recounts.

After the machine recount results are delivered, Florida Secretary of State Ken Detzner will order manual recounts if two candidates are separated by 0.25 percent of the vote or less.

The recounts and possible legal challenges mean it could be weeks until a winner is determined in either race.

In Tuesday’s elections, Democrats won a majority in the U.S. House of Representatives after eight years in the minority, while Republicans expanded their two-seat advantage in the Senate.

In Arizona’s ongoing Senate race, contested by two U.S. congresswomen, Democrat Kyrsten Sinema’s lead over Republican Martha McSally had widened by Saturday evening to about 23,900 votes, or 1.17 percent.

In Georgia’s gubernatorial election, Republican Brian Kemp declared victory on Wednesday with a narrow lead. Campaign officials for his rival, Democrat Stacey Abrams, have vowed to pursue litigation to ensure all votes are counted.

In a House race in California, Democrat Harley Rouda defeated the incumbent, 13-term Republican congressman Dana Rohrabacher, with 51.8 percent of the vote.