Thousands of Florida voters whose ballots were initially thrown out because their signatures didn’t match the state’s records will get a second chance at having them counted after a federal judge’s ruling — a win for Democrats in the ongoing battle over the state’s recounts.

The order from US District Court Judge Mark Walker came hours before the 3 pm deadline for counties to report the final tally of a machine recount for the US Senate and governor races (as well as the agriculture commissioner match, which is also tight).

Now Florida voters have until 5 pm Saturday to fix their ballots by providing proof of identity and correcting any signature problems.

Walker’s ruling begins with a long analogy about football, in which both teams might not agree on the right call by a referee but do share the principle that games need rules.

“In this case, the Plaintiffs have thrown a red flag,” Walker, an Obama appointee, wrote. “But this is not football. Rather, this is a case about the precious and fundamental right to vote—the right preservative of all other rights.”

Walker was scathing about Florida’s process, which allows counties to toss out mailed-in and provisional ballots for signature mismatches based on standards they set themselves.

“The precise issue in this case is whether Florida’s law ... passes constitutional muster,” reads Walker’s order in the Northern District of Florida. “The answer is simple. It does not.”

“These voters went above and beyond trying to get their legal votes counted,” he writes later in the opinion. “They contacted their local boards of election, presented valid identification, and tried to cure the incorrect signature mismatch determination. But there was nothing they could do.”

The ruling could be good news for the Democratic candidates, who are still trailing their GOP opponents. Currently, Republican Gov. Rick Scott is leading Bill Nelson by fewer than 13,000 votes in the Senate race. Republican Ron DeSantis has a wider lead over progressive Andrew Gillum, 34,000 votes ahead in the current count for the gubernatorial seat. Republicans had argued against counting ballots with signature mismatches or allowing voters more time to prove their identity.

Shortly after the ruling was announced, Scott’s campaign issued a statement saying they would immediately appeal it. Scott’s team called the ruling a “baseless decision,” another chance for Marc Elias, Nelson’s attorney, “to rack up massive legal fees regardless of the blatant hypocrisy ... or the damage this will do to Bill Nelson’s legacy.”

The recount process in Florida has dragged ever since Election Day, and confused many voters wondering what happens when races are simply too close to call. Vox’s Tara Golshan, Li Zhou, and P.R. Lockhart explained how the state handles the procedure, and the controversy it’s sparked: