A federal judge declared Florida’s process for restoring voting rights to convicted felons unconstitutional Thursday, calling for immediate changes to a clemency process that he said risks being tainted by racial, religious or political bias.

"In Florida, elected, partisan officials have extraordinary authority to grant or withhold the right to vote from hundreds of thousands of people without any constraints, guidelines or standards," U.S. District Judge Mark E. Walker wrote in a stinging 43-page ruling. "The question now is whether such a system passes constitutional muster. It does not."

His decision has the potential to enfranchise some voters before the 2018 elections through a new clemency process, and may influence an existing campaign to amend the state's permanent voting ban. Florida’s constitution currently bars anyone with a felony conviction from voting — unless the governor restores their rights through the arduous clemency process. As a result, a full 10 percent of the state’s voting-age population — and 21 percent of its black adults — could not cast a ballot in 2016, according to The Sentencing Project.

People vote in the general election in Miami Shores, Florida, on Nov. 8, 2016. Lynne Sladky / AP file

The office of Gov. Rick Scott, a Republican, said Friday it would fight the judge's ruling.

“The discretion of the clemency board over the restoration of felons’ rights in Florida has been in place for decades and overseen by multiple governors. The process is outlined in Florida’s Constitution, and today’s ruling departs from precedent set by the United States Supreme Court,” a spokesman for Scott said in a statement. “While we are reviewing today’s ruling, we will continue to defend this process in the court.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Millions of ex-cons lost their right to vote. Now they might get it back.

But Scott’s process for clemency is far more restrictive than some of his predecessors. Felons must wait five to seven years to apply for voting rights restoration; hearing back from the Clemency Board can take years. Then, many appear in person to personally beg for their rights back. Few are successful. As of early December, just 2,898 ex-felons saw their rights restored while 10,264 applications remain pending. The whole process can take years and Scott enjoys absolute control over whether an ex-felon's rights are restored.

Scott's predecessors granted clemency much more often: Charlie Crist restored the voting rights of 150,000 ex-offenders in four years, while Jeb Bush granted clemency to 75,000 in eight years.

Walker's ruling noted that he has rejected applications over traffic violations. And Scott offers personal questions and musings during hearings: The Miami Heraldreported that he'll ask children about a father's parenting abilities and audibly whispered, "That's how my uncle died," while hearing the case of an ex-offender with a DUI. He did not restore the man's rights.

"A state may disenfranchise convicted felons," the judge wrote. "A particularly punitive state might even disenfranchise convicted felons permanently. But once a state provides for restoration, its process cannot offend the Constitution."

Walker ruled that the clemency system violates the First and Fourteenth Amendments. He said that while the five to seven year waiting periods are acceptable, the "subjective" and "frankly mythical" standards for who gets approved or rejected were not. The process appears biased toward those who share the governor's views, and against those who do not, he added.

"When the risk of state-sanctioned viewpoint discrimination skulks near the franchise, it is the province and duty of this Court to excise such potential bias from infecting the clemency process," he concluded, calling for plaintiff and defendant to file briefings suggesting remedies by Feb. 12, at which point he will enter final judgment.

The suit was brought by a group of felons whose clemency applications had been denied, along with the Fair Elections Legal Network. It comes amid an activist-led movement to rewrite the state’s constitution to ensure that most felons get their voting rights back after completing their sentence without any kind of clemency process. The ballot initiative requires the support of 60 percent of Florida voters in November to pass, and would enfranchise an estimated 1.5 million people.

Desmond Meade, an ex-offender whose clemency application was rejected, said the court's Thursday ruling was "a pleasant surprise," but said his campaign to change Florida's constitution would continue as planned, particularly because a judicial fix is uncertain and could get tied up in court.

“We don’t know how long it will take,” he said. "The ruling really verifies what we’ve been saying about how this system is broken."

CORRECTION (Feb 2, 2018, 4:43 p.m. ET): An earlier version of this misspelled the last name of a former Florida governor. His name is Charlie Crist, not Christ.