The Florida secretary of state is ordering recounts in the U.S. Senate and governor races, an unprecedented review of two major races in the state that took five weeks to decide the 2000 presidential election.

Secretary Ken Detzner issued the order on Saturday after the unofficial results in both races fell within the margin that by law triggers a recount.

The unofficial results show that Republican former U.S. Rep. Ron DeSantis led Democratic Tallahassee Mayor Andrew Gillum by less than 0.5 percentage points, which will require a machine recount of ballots.

In the Senate race, Republican Gov. Rick Scott’s lead over Democratic incumbent Bill Nelson is less than 0.25 percentage points, which will require a hand recount of ballots from tabulation machines that couldn’t determine which candidate got the vote.

The ballot-counting issues are centered in Broward County and Palm Beach County, two populous counties that tend to vote Democratic. On Friday, Scott won two lawsuits — one ordering the Palm Beach County elections supervisor to submit “over-voted” and “under-voted” absentee ballots to the Palm Beach County Canvassing Board for public review of each vote before they are counted. Over-votes are ballots in which the machines read that the voter may have selected more than one candidate, and under-votes occur when the machine does not register a vote on the ballot. The other lawsuit ordered the Broward County elections supervisor to release records of voter information.

Scott and President Trump have claimed without offering evidence that Democrats are tampering with the election. Mr. Trump wrote a tweet Saturday afternoon that seemed to allude to the recount, saying: “Trying to STEAL two big elections in Florida! We are watching closely!”