TALLAHASSEE, Fla. (AP) — Florida officials say thousands of mailed ballots were not counted because they were delivered too late to state election offices.

The Department of State late last week informed a federal judge that 6,670 ballots were mailed ahead of the Nov. 6 election but were not counted because they were not received by Election Day. The tally prepared by state officials includes totals from 65 of Florida’s 67 counties. The two counties yet to report their totals are Palm Beach, a Democratic stronghold in south Florida, and Polk in central Florida.

ADVERTISEMENT

Three statewide Florida races, including the contest for governor, went to state-mandated recounts because the margins were so close.

In the battle for agriculture commissioner, Democrat Nikki Fried won her election by 6,753 votes. Republican Gov. Rick Scott ousted incumbent Democrat U.S. Sen. Bill Nelson by slightly more than 10,000 votes.

Under Florida law, ballots mailed inside the United States must reach election offices by 7 p.m. on Election Day. Overseas ballots are counted if they are received up to 10 days after the election.

A group called VoteVets Action Fund along with two Democratic organizations filed a lawsuit a few days after the 2017 election that argued the ballots should count if they were mailed before Election Day.

But U.S. District Judge Mark Walker said the restriction was reasonable and that Florida election officials have a right to establish deadlines. He turned down an emergency request that all properly postmarked ballots received up to 10 days after the election be counted.

The lawsuit, however, is still pending and Walker asked that state election officials report how many ballots were mailed before Election Day but ultimately were not counted.

Walker was the judge involved in a half-dozen lawsuits that were filed following the razor-thin elections in Florida.

In a separate lawsuit filed last month, Walker gave voters extra time to fix their mail-in ballots if they were not counted because their signature on their ballot envelope did not match the one on file with local election officials.

State officials testified in court that nearly 4,000 mailed-in ballots were set aside because local officials decided the signatures on did not match. The Department of State last week informed Walker that his ruling resulted in 637 votes being counted in the final totals.