For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Judge Julie Robinson was losing patience. Before the 2016 election, she had ordered Kansas Secretary of State Kris Kobach to restore the right to vote to thousands of Kansans who’d been disenfranchised by a state law requiring proof of citizenship to register to vote. On Tuesday, Kobach was again in her courtroom, this time at the tail end of an eight-day trial challenging the proof-of-citizenship law, in which the ACLU was also asking Robinson to hold Kobach in contempt of court for declining to tell those voters that they were once again eligible to vote. “I made it clear they’re fully registered voters,” she told Kobach, pounding on her desk for emphasis.

Kobach’s battle against the ACLU was supposed to be a showcase for his claims of widespread voter fraud. When he ran for Kansas secretary of state in 2010, Kobach said “the illegal registration of alien voters has become pervasive.” That led Kansas to pass the law requiring people to provide documentation including a birth certificate, passport, or naturalization papers to register to vote. The law prevented 35,000 Kansans from registering between 2013 and 2016.

Instead, the trial devolved into a comedy of errors, with Kobach’s witnesses frequently contradicting his claims or getting humiliated by pointed questions they couldn’t answer.

Kobach, who led President Donald Trump’s election integrity commission and is now running for governor, hired Hans von Spakovsky of the Heritage Foundation to support his claim that illegal votes by non-citizens had swung US elections. But under questioning from ACLU lawyer Dale Ho, von Spakovsky admitted he couldn’t name a single election where votes by non-citizens had decided the outcome.

Kobach cited Jesse Richman, a professor of political science at Old Dominion University, to defend the charge that Hillary Clinton won the popular vote in 2016 because of millions of illegal votes. But when Ho asked Richman if illegal votes had provided the margin for Clinton, Richman said “no.”

Richman produced a study for Kobach last year alleging that as many as 18,000 non-citizens were registered to vote in Kansas. However, the study offered evidence of only six noncitizens who attempted to register. Richman admitted in court that he didn’t know if they had succeeded in registering or voting. And the methodology Richman used to identify noncitizen voters was deeply flawed: He simply flagged people with “foreign”-sounding names, although he was inconsistent in his execution. As Talking Points Memo reported, “two respondents with the last name Lopez were coded as foreign, and three Lopezes were not.”

On the sixth day of the trial, Ho read a series of names and asked Richman if he would label them as foreign-sounding. When he came to the name Carlos Murguia, Richman said he probably would flag it as foreign. Ho responded that Carlos Murguia was a federal judge in that very courthouse in Kansas City.

Over and over, the claims of voter fraud offered by Kobach and his witnesses collapsed under scrutiny. Kobach asked Tabitha Lehman, the clerk of Sedgwick County, Kansas, to share a spreadsheet showing that 38 noncitizens in the county had registered or attempted to register. But under questioning from the ACLU, Lehman conceded that only five of them had voted over the past two decades, when 1.3 million votes were cast in the county. Kobach has often said that the evidence of fraud he’s uncovered in Kansas is only “the tip of the iceberg.” In his closing argument, Ho said, “The iceberg, on close inspection, Your Honor, it’s more of an ice cube.”

To rebut Kobach, the ACLU presented voters who had been prevented from registering by the law. One was Charles Stricker III, a hotel manager in Wichita who brought three forms of ID to the DMV when he attempted to register but was blocked from doing so because he didn’t show proof of citizenship. Ho said that preventing thousands from registering because of only a few suspected cases of noncitizen voting was “like taking a bazooka to a fly.”

Robinson, who was appointed to the federal district court in Kansas in 2001 by George W. Bush, was having none of Kobach’s creative courtroom maneuvers. Earlier in the trial, she castigated Kobach for attempting to introduce evidence that was not properly submitted to the court. “We’re not going to have a trial by ambush here,” she told him, lecturing Kobach on what she called “Evidence 101.”