In a blistering ruling, a federal judge on Monday permanently struck down Kansas’s proof-of-citizenship voter registration law pushed by Republican Kansas Secretary of State Kris Kobach.

The ruling was a devastating defeat for Kobach, one of the country’s most vocal advocates of voter-ID laws.

In the 118-page ruling, U.S. District Judge Julie Robinson wrote that the state’s requirement that voters show proof of citizenship during registration violated both the Constitution and the National Voter Registration Act.

Robinson struck down the stringent law, and ordered Kobach to take six additional hours of continuing legal education that “pertain to federal or Kansas civil rules of procedure or evidence.”

Robinson wrote that the law, championed by Kobach, prevented “tens of thousands of eligible citizens” from registering to vote before she issued a preliminary injunction, and that “the process of completing the registration process was burdensome for them.”

According to the American Civil Liberties Union (ACLU), Kobach’s law blocked some 35,000 Kansans from being able to register to vote.

In an earlier court order, Robinson had held Kobach in contempt for skirting court orders related to the law and failing to send postcards confirming registration for thousands of voters.

Kobach, who personally defended the law in court, is running for Kansas governor. He was a former vice-chair of President Trump’s now-defunct voter fraud commission.

The ACLU, which filed the lawsuit on behalf of the Kansas League of Women Voters, praised Robinson’s ruling in a statement.

“That law was based on a xenophobic lie that noncitizens are engaged in rampant election fraud,” said Dale Ho, director of the ACLU’s Voting Rights Project. “The court found that there is ‘no credible evidence’ for that falsehood, and correctly ruled that Kobach’s documentary proof-of-citizenship requirement violates federal law and the U.S. Constitution.” ShareTweet