A federal judge on Monday ruled that Kansas’ proof of citizenship voter registration requirement was a violation of the Constitution as well as the National Voter Registration Act.

U.S. District Judge Julie Robinson had in previous orders temporarily blocked the requirement, which was championed by Kansas Secretary of State Kris Kobach. Robinson on Monday handed down her decision on merits of the case, which went to trial earlier this year.

Her 100-plus page opinion also knocked Kobach, who defended the law himself in court, for his “history of non-compliance with this Court’s orders,” and imposed “sanctions responsive to Defendant’s repeated and flagrant violations of discovery and disclosure rules.” She ordered he take six hours of legal ed classes.

The case was a consolidation of two lawsuits: one from a college student alleging a constitutional violation, and the other an ACLU challenge on behalf of individual voters as well the Kansas League of Women Voters that focused on the National Voter Registration Act claim.

Robinson said that evidence brought by the League of Women Voters, which argued the requirement complicated its voter registration drives, led her to conclude “that tens of thousands of eligible citizens were blocked from registration before this Court’s preliminary injunction, and that the process of completing the registration process was burdensome for them.”

The judge also went through the testimonies of the individual Kansans who had challenged the law, arguing that their experiences backed up the testimony of the League of Women Voters, as well as the challengers’ expert witnesses, in illustrating the “concerns about the barriers to registration after the DPOC [documentary proof of citizenship] law became effective.”

Kansas had put forth a voter who had gone through a hearing process the state set up for individuals who claimed to have been unable to find any of the documents meeting the registration citizenship requirement. Robinson on Monday said that the woman, Jo French, had actually contradicted Kansas’ position in her testimony, which showed “the lengthy and burdensome process of registering to vote without a citizenship document.”

Robinson, in her decision Monday, took into account the test previously handed down by the 10th U.S. Circuit Court of Appeals outlining what Kansas would have to prove for the requirement to be legally permissible. The first part of the test was whether there was a “substantial” number of non-citizens registering under the old system of registrants signing an affidavit attesting to their eligibility, and here Robinson said that she found “no credible evidence that a substantial number of noncitizens registered to vote under the attestation regime.” She said that analysis put forward by Kansas expert witness Hans von Spakovsky was likely based on “misleading evidence, and largely based on his preconceived beliefs about this issue, which has led to his aggressive public advocacy of stricter proof-of-citizenship laws.”

She also said that 39 cases of confirmed noncitizen registrants put forward by the state were not substantial “when compared to the total number of registered voters, the total number of noncitizens in Kansas, or the number of applicants on the suspense/cancellation list as of March 2016.”

“Defendant insists that these numbers are just ‘the tip of the iceberg.’ This trial was his opportunity to produce credible evidence of that iceberg, but he failed to do so,” Robinson said.

The second part of the appeals court’s test was whether “‘nothing less than DPOC is sufficient to meet’ Kansas’s NVRA eligibility-assessment and registration duties,” Robinson wrote. Robinson cited arguments by the challengers that better training would be sufficient to cut down on non-citizens inadvertently being registered to vote, as well as to testimony by the challengers’ experts that many of the non-citizen registrations cited by the state appeared to have been due to administrative error.

“If most noncitizen registrations are due to mistake or administrative error, as opposed to intentional fraud, that fact shapes the best method for enforcing the citizenship requirement,” Robsinson said, later arguing that “More consistent, centralized training for county clerks” would be a ” less burdensome way,” among others discussed in the case, “to ensure to the best of their abilities that noncitizens do not inadvertently end up on the voter rolls.”

Kobach indicated during the proceedings that he would appeal a district court loss to the appeals court, and to the Supreme Court if necessary.

Robinson’s decision recounted the number of procedural issues Kobach and his legal team ran into over the course of the proceedings, which included his failed attempt to introduce new internal state voter registration statistics on the eve of the trial, instead of during the typical discovery process, as well as a rules he broke in introducing various witness testimonies.

She said that Kobach showed “a pattern and practice” of “flaunting disclosure and discovery rules that are designed to prevent prejudice and surprise at

trial,” prompting her to impose sanctions on him — specifically six hours of legal education, beyond those required by his law license, focusing on trial procedure.

“It is not clear to the Court whether Defendant repeatedly failed to meet his disclosure obligations intentionally or due to his unfamiliarity with the federal rules. Therefore, the Court finds that an additional sanction is appropriate in the form of Continuing Legal Education,” she said. “Defendant chose to represent his own office in this matter, and as such, had a duty to familiarize himself with the governing rules of procedure, and to ensure as the lead attorney on this case that his discovery obligations were satisfied despite his many duties as a busy public servant. ”