TOPEKA, Kan. — He’s brushed aside the state’s woeful financial straits. He’s dismissed concerns that driving in parades with a machine-gun replica mounted on his Jeep might come off as offensive.

Instead, in an audacious performance that mimics President Trump more than anyone else, Republican gubernatorial candidate Kris Kobach at every campaign stop touts his biggest achievement, a strict citizenship law for voters — that no longer exists.

Kobach has spent the last seven years as the state’s chief election officer burnishing his national profile as a crusader against illegal immigration and fashioning one of the toughest voting laws in the country, one that included a proof-of-citizenship requirement struck down as unconstitutional by a federal judge in June.

But that has not stopped him from promoting the failed law as a career triumph as the heated race enters its final stretch, using deliberately misleading language that mocks the judge’s ruling. Polls show Kobach virtually tied with his Democratic opponent, state Sen. Laura Kelly.

“Every time an alien votes, it cancels out the vote of a U.S. citizen!” Kobach said at a rally here earlier this month as Trump beamed approvingly at his side, to a rousing chant of “U.S.A.! U.S.A.!” He called for other states to require proof of citizenship, too — “Just like Kansas!”

When Kobach, 52, was tapped as vice chair of Trump’s now-disbanded voting fraud commission last year, he cemented his reputation as a national leader in the Republican effort to tighten voting laws in ways that civil rights activists say imperil voting rights of the poor, youth and minorities.

He supports President Trump’s assertion that millions fraudulently voted for Hillary Clinton during the 2016 election, even though no evidence for that assertion has surfaced and voting experts roundly disagree. (The president, too, is not dissuaded, warning in an Oct. 20 tweet that poll violators would be prosecuted: “Cheat at your own peril.”)

“It’s a pervasive problem,” Kobach insisted in an interview at the GOP party headquarters in a small strip mall in the state capital.

To support his argument, he cited an estimate ruled statistically invalid by the court: “Just looking at Kansas, if you’re talking up to 30,000 noncitizens on the rolls in the state of our size, the numbers would have been much, much bigger in Texas and California.” (The judge ruled that 67 people “at most” had wrongly registered to vote in Kansas since 1999, while thousands were prevented from voting.)

Democrats and voting rights activists contend that if anybody is engaged in vote rigging, it is Kobach. Democrats have repeatedly raised questions about Kobach’s conduct as the state’s elections officer — he essentially oversees his own tight race — and alleged at a news conference Thursday that the general election could be “stolen.” The Democratic minority leaders of the state House and Senate called for him to step down.

Voters in Kansas have received a flurry of texts with misleading voting information recently, and Latino groups have protested a local decision to move a polling station in Dodge City out of bus range for a huge immigrant population there.

Kobach’s spokesman, Danedri Herbert, called the allegations “ridiculous.”

The secretary of state has focused his campaign around his voting stance, but far bigger problems face Kansas, and opponents argue Kobach’s proposals would make them worse. If Kobach wins on Nov. 6 — along with Kelly, he also faces independent challenger Greg Orman, a businessman — he will inherit a windswept farming state that is still reeling from steep tax cuts by the former governor, Sam Brownback, now Trump’s ambassador for international religious freedom.

Brownback’s sharp cuts were rolled back by a Republican-led legislature last year to remedy a billion-dollar shortfall; the state has scant reserves and is embroiled in a nasty court battle over school funding.

Despite that, Kobach has promised voters he will cut taxes again.

“It’s absurd,” Kelly said. “There is no way we can go back to the Brownback experiment. Sam Brownback pushed these tax cuts through, and even when Kansas was falling apart in front of his face, Brownback wouldn’t admit it. Now we have Kris Kobach, who lived through all of that, saying we need to get back there. That’s not living in reality.”

Kobach has called Kelly out for voting for his voter ID bill (true) and for voting for a bill to allow “sanctuary cities” to continue protecting illegal immigrants (false).

Kelly’s mild manner is a contrast to the fast-talking Kobach, who flashes a Dennis Quaid grin and wears his navy suit jackets baggy, like the commander in chief. His tendency to exaggerate, imposing height and fierce nativism have inspired other comparisons to Trump, but he was Trumpian long before the president decided to run for office, according to Patrick R. Miller, an assistant professor of political science at the University of Kansas.

“It’s definitely not Midwest ‘nice’,” Miller said.

Staunch conservatives in Kansas have applauded Kobach’s positions on abortion, fiscal issues and immigration. Many interviewed said they were frightened by the caravan of Honduran migrants they believe are headed their way. (The caravan to which they referred is nearly 1,000 miles from the southern border, far from Kansas.)

“There’s not a single thing Kris says I don’t agree with,” said Christy McNally, a retired teacher from the town of Mulberry. “Kansas needs somebody strong right now, and he’s a man who will go where angels dare not tread.”

Kobach, the son of a Buick dealer, was raised in Topeka, and earned degrees from Harvard and Oxford universities and Yale Law School. He was tapped for a White House fellowship in 2001, arriving just before the 9/11 terrorist attacks. He later helped build a now-discontinued government system that tracked entrants from mostly Muslim countries.

The fact that the 9/11 hijackers entered the country on legal visas “haunted me,” Kobach said, and “shifted the trajectory of my career.”

Kobach’s influence widened when his pheasant-hunting buddy, Donald Trump Jr., introduced him to candidate Trump in 2016.

Kobach has since pushed the administration toward get-tough policies, including adding a citizenship question to the U.S. census, and was named the vice chair of the president’s voter fraud panel, which disbanded earlier this year without finding widespread evidence of fraud.

Trump’s primary-eve endorsement in August — a “fantastic guy” the president tweeted — eventually helped Kobach eke out a 343-vote victory over incumbent Gov. Jeff Colyer, who became the chief executive early this year when Brownback took the Trump administration job.

The last months of Kobach’s campaign would have challenged most candidates. In May, the federal district court judge overseeing the voting lawsuit cited Kobach for contempt of court for failing to notify voters of an injunction in the case that would allow them to vote.

And in June, U.S. District Judge Julie A. Robinson, a George W. Bush appointee, threw out the requirement that Kansas voters prove their citizenship, which prevented an estimated 35,000 Kansas residents from voting from 2013 to 2016, according to the American Civil Liberties Union. She also ordered Kobach to attend six hours of continuing legal-education classes for “repeated and flagrant violations of discovery and disclosure rules.”

Kobach says Robinson’s order was “odd” and “highly unusual,” but that he would not be deterred.

“We’re confident on appeal we’re going to win this case,” he said. “The law is on our side.”

One sunny Saturday this month, hundreds gathered in the northeastern Kansas town of Baldwin for its annual Maple Leaf Festival parade. The maple trees had turned orange and scarlet for the occasion. Spectators lined the streets. Colorful floats passed by. A high school band played “America the Beautiful.”

And then came Kobach aboard a Jeep emblazoned with an American flag and with a “replica” .50-caliber machine gun on top, smiling and waving from atop the vehicle, two of his five daughters in the back.

The machine-gun Jeep provoked national condemnation after its debut in June, and Kobach has since dragged it to almost every parade, embracing it as a symbolic proof, he says, that he will not back down when the “liberal snowflakes” attack. President Trump has now autographed it.

“He scares me,” said Ted Pillar, a Lawrence resident and retired teacher, as Kobach passed by. “Who would ride around in a Jeep with a machine gun on top of it? What is that supposed to say? And he’s going to do the same thing Brownback did — go after illegal immigrants.”

His wife, Diana, chimed in: “God help them.”

Nearby, a 65-year-old retiree named Sherry said she was a registered Republican but will not be voting for Kobach because “he’s too radical.” She declined to give her last name for privacy reasons.

“He’s unmoderate, and the gun thing put it over the top,” the woman said. “But they’re gonna elect him — just as sure as God made little green apples.”