RIVIERA BEACH, Fla. — Florida concluded the first phase of a tumultuous recount of its midterm election on Thursday, with state officials ordering a manual recount in the hotly contested Senate race between Rick Scott, the Republican governor, and the Democratic incumbent, Bill Nelson.
Mr. Scott maintained a slim lead over his opponent. Ron DeSantis, a fiery conservative and enthusiastic ally of President Trump, held onto a more substantial lead in the race for governor, avoiding a next round of recounts despite the vow of his Democratic opponent, Mayor Andrew Gillum of Tallahassee, to push the authorities to count additional ballots.
“It is not over until every legally casted vote is counted,” Mr. Gillum declared at the end of another chaotic day — nine days after the election — in which the state’s two marquee races remained disconcertingly up in the air.
From the early morning hours through midafternoon, when the results of the state’s machine recount were posted, lawyers for both parties filed new lawsuits, rushed to court hearings and issued statements challenging the conduct of the vote — crucial arguments on voter suppression and ballot recognition that will help lay the legal groundwork for the 2020 election.
Confusion and disorder reigned through much of the five-day machine recount. Broward County, the scene of several years of vote-counting problems, was two minutes late in reporting its data and state officials refused to accept its tallies. Authorities in Hillsborough County said they could not submit recount totals because their new tally had 846 fewer votes than originally counted. The office had two power failures during the recount that may have led to the discrepancy, they said.
“We have been the laughingstock of the world, election after election,” Judge Mark E. Walker of the Federal District Court in Tallahassee told lawyers Thursday morning. “Yet we still chose not to fix it.”
In results reported by the Florida secretary of state, Mr. DeSantis held a 33,683-vote lead over Mr. Gillum, a margin of 0.41 percentage points — enough to avoid an order by state officials for a manual recount.
Mr. Gillum said he would continue his push to have all ballots — including some of those initially rejected because of mismatched signatures or other problems — counted before any election results were certified.
“A vote denied is justice denied — the State of Florida must count every legally cast vote,” he said in a statement.
But people close to Mr. Gillum said he had few illusions about pulling out a victory at this point, and his decision to remain in the race was less about strategy than recognizing voters and supporters who wanted him to keep fighting until every alternative had been exhausted.
[Follow the latest Florida election results]
Mr. DeSantis said the new results were “clear and unambiguous, just as they were on election night.”
Mr. Gillum initially delivered an emotional concession speech to his supporters late on Election Day, then withdrew his concession as the vote margin narrowed and Democratic lawyers filed a flurry of lawsuits to allow additional ballots to be counted.
Meanwhile, state officials ordered a manual recount in the Senate race, where Mr. Scott held a 12,603-vote lead over Mr. Nelson, a margin of 0.15 percentage points.
Under state law, a manual recount is ordered when the margin is less than 0.25 percentage points. The Associated Press said it would not call any of Florida’s races until the results were certified by state elections authorities. That is scheduled to happen on Nov. 20.
Mr. Scott, who has joined Mr. Trump in publicly berating Mr. Nelson for not quitting the race, renewed his call for Mr. Nelson to drop out immediately.
“Last week, Florida voters elected me as their next U.S. senator and now the ballots have been counted twice,” Mr. Scott said in a statement. “Our state needs to move forward. We need to put this election behind us, and it is time for Bill Nelson to respect the will of the voters and graciously bring this process to an end, rather than proceed with yet another count of the votes — which will yield the same result, and bring more embarrassment to the state that we both love and have served.”
Mr. Nelson, backed by a high-powered Washington legal team, disregarded those calls, and remained committed to fighting until all his legal options are exhausted, several people close to the three-term senator said.
His lawyer, Marc Elias, said the manual recount — which must be completed by Sunday — would finally provide the answers the Nelson campaign had sought. He predicted that tens of thousands of as-yet uncounted votes would swing the race in his client’s favor.
The new count will not tally all votes cast, but will examine all ballots in which voters either cast two votes for one race, known as an overvote, or none, known as an undervote. Mr. Elias in a conference call Thursday evening suggested there were as many as 23,000 of those kinds of votes in Broward County alone.
“We will be able to see whether there were markings on those ballots or not,” Mr. Elias said.
Veterans of Florida elections from both parties expressed disgust over an array of technical breakdowns, human glitches and missed deadlines that seem to plague the state’s decentralized, county-based elections system with Groundhog Day predictability.
Broward County, where election workers had toiled late into the night for days on end to recount their votes, saw it all amount to nothing when state officials rejected the tally as too late. “Basically I just worked my ass off for nothing,” said Joseph D’Alessandro, the county’s election planning and development director. He said he had had difficulty uploading the results because he was not familiar with the website.
The machine recount broke down completely in Palm Beach County. Authorities there said the tabulation equipment came up short “a significant number” of ballots in the final Senate tally, making it impossible for the county to meet the Thursday deadline.
Many of the antiquated tabulation machines used by the county overheated earlier this week, creating the need to count nearly 200,000 votes again. An additional problem surfaced later, according to the Palm Beach County elections supervisor, Susan Bucher. After the mechanical failure was corrected and the machines were restarted, they apparently failed to tabulate entire boxes of votes; the totals did not add up, Ms. Bucher said.
Ms. Bucher would not say exactly how many boxes of ballots were missing from the count.
“A little bit more than a dozen precincts lost substantial numbers,” she said.
Workers were having to look through count logs to see how many ballots are missing from each precinct, and to try to figure out, based on the numbers of ballots in the box, which of them might have to be put through the machine again, she said.
Despite all the problems, most election workers in Palm Beach County did not show up for work until about 10 a.m. on Thursday. Ms. Bucher defended her decision to let her exhausted staff go home at 9 p.m. the night before to sleep and eat. A skilled team of three workers needed to be alert on Thursday morning to try to solve the machine malfunctions, she said.
“You can’t just have anybody run this,” she said.
In all three counties that did not have recount results accepted, initial tallies reported before the statewide machine recounts will stand.
Perhaps inevitably, the various snafus have led to lawsuits, most of them filed by Mr. Nelson’s campaign and allied Democratic groups.
The initial phase of the recount was the subject of about a dozen lawsuits over which ballots would be counted and what deadlines would apply.
With Palm Beach County unable to produce a final tally in time, lawyers held a hearing in federal court Thursday morning on a Democratic Party effort to get the recount deadlines extended.
Judge Walker asked a question none of the lawyers seemed able to answer: Would it be legal to proceed with recount results that are missing one county?
“There is no constitutional right to have your vote counted a second time or a third time,” Mohammad Omar Jazil, a lawyer for the Florida secretary of state, told the court.
Democratic lawyers filed a new lawsuit Thursday afternoon against Palm Beach County, seeking a hand recount of all ballots in the county “due to systematic machine failure during the machine count,” Mr. Nelson’s lawyer, Mr. Elias, said on Twitter.
Separately, Judge Walker ruled early Thursday that a state law allowing county election officials to reject vote-by-mail and provisional ballots because voters’ signatures do not match the ones on file threatens to unconstitutionally disenfranchise thousands of voters. His order gives voters whose ballots were invalidated by signature mismatches until 5 p.m. Saturday to resolve the problems with their ballots.
The new deadline would apply to some of the just over 4,000 voters who were notified late that their mail-in ballots had been rejected because of a signature mismatch. Those voters will now have until Saturday to confirm their identities.
“There are dozens of reasons a signature mismatch may occur, even when the individual signing is in fact the voter,” the judge wrote. “What this case comes down to is that without procedural safeguards, the use of signature matching is not reasonable and may lead to unconstitutional disenfranchisement.”
Although the rejected ballots were split among party lines, with slightly more Democratic votes, they disproportionately affected young voters. Daniel A. Smith, an elections expert at the University of Florida, said 26 percent of the ballots rejected for user error belonged to people under 30, even though young voters constituted only about 7 percent of those who voted by mail.
Mr. Smith’s tabulations show that 10,000 ballots were rejected for signature or other user error problems, more than double the preliminary figures the state provided to the federal court.
Howard Simon, executive director of the American Civil Liberties Union of Florida, which this year commissioned Mr. Smith to conduct a study on various problems with mail-in voting, said the problems with Florida’s methods of reviewing signatures on ballots have long been apparent. “It’s not like nobody could see this coming,” he said.