It wasn’t that long ago that Kris Kobach looked like a legitimate threat to democracy. Two weeks after Donald Trump’s victory in the 2016 election, the Kansas secretary of state was photographed walking into a meeting with the president-elect holding a document laying out his strategic plan for the Department of Homeland Security. When Kobach was named vice chair of Trump’s Presidential Advisory Commission on Election Integrity six months later, it seemed he’d maneuvered himself into a position he could use to imperil the voting rights of an untold number of Americans.

We shouldn’t have worried. Kobach’s national crusade against the phantom threat of voter fraud quickly collapsed under the weight of his own arrogance. A trial in Kansas has also revealed that his quest to boot thousands of voters off the rolls was a lawless farce, while his quest to be the next Republican governor of Kansas also appears in peril given his embarrassingly small fundraising haul. It’s now clear that Kobach was always more likely to get caught brandishing a piece of paper titled, essentially, “My Awesome Evil Plan” than to succeed in using the tools of government for nefarious ends. Kobach is no longer powerful, and he was never smart. He is, for lack of a better term, a loser.

Kobach’s rise and fall were both fueled by his obsession with “election integrity.” During his 2010 run for Kansas secretary of state, the candidate told journalists he had identified about 2,000 dead voters on the rolls. As an example, he named Alfred Brewer, who supposedly died in 1996 but voted in 2010. A few days later, the Wichita Eagle found Alfred Brewer at his home, raking leaves. Kobach had apparently confused him with his father.

Still, Kobach won his race handily, and soon after, he persuaded the legislature to pass a law he’d drafted requiring that voters show proof of citizenship to register to vote. He also dramatically expanded the Crosscheck Program, which purports to identify voters registered in multiple states. While double registration isn’t illegal, states must keep their voter rolls updated, and Crosscheck ostensibly helped officials identify names to purge. Citing the program, Kobach alleged that 125,000 Kansas voters were also registered elsewhere, insinuating that many of them were casting ballots in multiple states.

Kobach had a good thing going, which he ruined by attempting to pass off this nonsense in court.

Although Kobach later reduced that number to about 80,000, the specific count doesn’t really matter, as the whole program turned out to be bunk. A statistical analysis conducted by researchers at Harvard, Stanford, the University of Pennsylvania, and Microsoft found that Crosscheck has an astounding 99.5 percent failure rate. The vast majority of potential double voters Kobach had ostensibly identified were false positives. Making matters worse, the Kansas secretary of state’s office, which runs the system, kept its data on an insecure server that was extremely vulnerable to hackers. Over the past few years, eight states have withdrawn from Crosscheck, citing its data insecurity and terminal unreliability.

For a while, Kobach had better luck with his proof-of-citizenship initiative. Between 2013 and 2016, the measure blocked more than 35,000 Kansans from registering to vote. In 2015, Kobach also acquired the ability to prosecute individuals for voter fraud. He secured just nine convictions—almost all of them older Americans who thought they could vote on local issues in each of the states where they owned homes. As punishment, these accidental lawbreakers received small fines. Kobach had promised to imprison criminal immigrant voters; he wound up charging confused senior citizens.

This failure did not convince Kobach to abandon his holy war. When Trump claimed in 2016 that millions had cast fraudulent votes again him, Kobach saw an opportunity. “I think the president-elect is absolutely correct,” he said that November, “when he says the number of illegal votes cast exceeds the popular-vote margin between him and Hillary Clinton at this point.”

To support this wild allegation, Kobach cited the work of political scientist Jesse Richman, who alleged that 6.4 percent of noncitizens voted in the 2008 election. In January 2017, nearly 200 political scientists signed an open letter condemning the methodology and findings of the Richman study. Nevertheless, Kobach hired Richman to estimate the number of noncitizen voters in Kansas. When Kobach presented his findings to the state legislature—Richman claimed, based on an egregious abuse of data, that 18,000 noncitizens were registered—the gallery exploded in laughter.

Kobach might have faced ridicule at home, but he had a friend in the new president. Although Trump’s advisers persuaded him not to appoint Kobach to lead the Department of Homeland Security, the president did install the Kansas secretary of state as the head of a newly created voter-fraud commission. Kobach promptly sent a letter to every state requesting an alarming amount of voter data, including each voter’s full name, party registration, and voting history, as well as the last four digits of their Social Security number.

State officials, both Democrats and Republicans, responded with outrage. Delbert Hosemann, Mississippi’s Republican secretary of state, declared that the commission “can go jump in the Gulf of Mexico,” adding tartly that he would fight “to protect the privacy of our citizens by conducting our own electoral processes.” The few officials sympathetic to Kobach learned state law often barred them from handing over the requested information. Even Kobach could not comply with his own request under Kansas law. In the end, most states refused to provide all of the data, and many turned over none of it.

That incident was indicative of Kobach’s broader handling of the commission. Ahead of a meeting in New Hampshire, he wrote a Breitbart column claiming to have “proof” of fraudulent voting in the state. His claim was thoroughly debunked, and his fellow commissioners openly criticized him at the meeting. One of those officials, Maine Secretary of State Matthew Dunlap, a Democrat, sued Kobach and the commission, alleging they were hiding key documents from him in violation of federal regulations. A judge ruled in Dunlap’s favor and ordered Kobach to turn over the documents.

Rather than comply, Kobach disbanded the commission in early 2018. In an attempt to save face, he claimed he would take his work to the DHS. But the agency swiftly announced that it would not be working with Kobach, effectively calling his bluff. Even the White House distanced itself from Kobach, with unnamed officials telling Politico that the commission never should have existed.

Kobach limped home to Kansas to prepare for a bench trial over his proof-of-citizenship law. That trial, which began earlier this month and is ongoing, has been an unmitigated disaster for Kobach—a merciless rebuke of his professional life’s work. The trouble actually began well before the trial started, when a federal judge fined Kobach $1,000 in June for making “patently misleading representations to the court” about a document he’d taken to his initial meeting with Trump, one that proposed eviscerating a federal voting rights law. A different judge then almost held Kobach in contempt for refusing to comply with a court order and accused him of having “sandbagged” the court by trying to introduce new evidence at the last minute.

Remarkably, things only got worse for Kobach. In an unusual move, he decided to try the case himself with the assistance of lawyers from the secretary of state’s office. It quickly became apparent that he does not understand civil procedure in the slightest. Early on, U.S. District Judge Julie Robinson, a George W. Bush appointee, reprimanded Kobach and his team for failing to follow the rules. “Evidence 101,” she told him. “Not going to do it.” Later, she instructed Kobach to “please” read the rules of evidence, noting that he had made the same mistakes “ad nauseam.” Eventually, Robinson delivered a trenchant lecture to Kobach from the bench, scolding him for attempting “trial by ambush.”

Meanwhile, the ACLU, which filed suit against the proof-of-citizenship measure, savaged Kobach’s paranoid theories in meticulous detail. His expert, Richman, was forced to concede on the stand that his work did not suggest that Trump lost the popular vote due to fraud, as Kobach had asserted. ACLU attorney Dale Ho also illustrated the profound infirmities of Richman’s methodology—which, again, formed the basis of Kobach’s allegation that 18,000 noncitizens are registered to vote in Kansas. As part of his process, Richman flags names on the voter rolls that sound “foreign.” Ho asked him if the name “Carlos Murguia” would be flagged. Richman said yes. Ho informed him that Murguia is a federal judge who works in that very courthouse.

Robinson will almost certainly rule against Kobach. If the secretary of state appeals, even a conservative judge sympathetic to Kobach’s voter-suppression agenda would have a hard time upholding this act with a straight face.

It is difficult to overstate the damage this trial has done to Kobach’s mission of disenfranchisement. The secretary of state has spent years building up a dossier of pseudoscientific studies that putatively prove the existence of mass fraud at the polls. His claims have served their political purpose: Republicans cite them as holy writ, Democrats contest them, and their validity became yet another point of partisan debate. Kobach had a good thing going, which he ruined by attempting to pass off this nonsense in court, where evidence is scrutinized for its veracity rather than its partisan utility. The result has been catastrophic for Kobach’s cause, exposing the voter-fraud panic to be nothing more than a cynical, half-baked myth.

And what of Kobach himself? The secretary of state still has a few prosecutions against senior citizens to wrap up and a gubernatorial race to run. Although Donald Trump Jr. has campaigned for him, Kobach’s fundraising is lagging far behind current Republican Gov. Jeff Colyer. Even so, Kobach is a legitimate contender in a crowded GOP field. With the Republican primary not scheduled until August, though, there’s still plenty of time for Kobach to figure out a way to sink his own candidacy.

If Kobach indeed loses the primary, it may well be because Kansans are exhausted by his disquieting fixation on a problem that does not exist. Or it could simply be because Kobach himself is too obtuse to sell his own lies—so obtuse, in fact, that he’s managed to disprove his falsehoods while attempting to corroborate them. While liberals have long worried about his growing influence, it turns out they had little to fear: Like his pet cause, Kris Kobach is a total fraud.