TOPEKA — Kris Kobach shows no signs of wavering in his support of President Donald Trump after Trump’s former attorney said in court he was directed to pay two women during the 2016 campaign in violation of federal campaign finance law.

Kobach, the Kansas secretary of state, has said Trump’s last-minute endorsement of him in the Aug. 7 Republican primary for governor played a key role in his victory. Kobach beat Gov. Jeff Colyer by just 350 votes.

And Kobach has been quick to play up what he and Trump share in common.

In an interview Wednesday, Kobach said he continues to stand behind the president after former Trump attorney and fixer Michael Cohen pleaded guilty to campaign finance violations on Tuesday and a jury found former Trump campaign chairman Paul Manafort guilty of tax fraud.

Cohen pleaded guilty to paying a pornographic film actress and a former Playboy playmate to stay quiet about sexual relationships with Trump in the lead-up to the 2016 election. Cohen said in court that he made the payments at Trump’s direction, implicating the president in Cohen’s violation of campaign finance laws.

“The Cohen issue is at this point nothing more than a plea bargain,” Kobach said, adding that it’s too early to draw conclusions.

Kobach also suggested the prosecution of Manafort by Special Counsel Robert Mueller showed that Mueller had gone beyond his original purpose.

“The Manafort conviction has nothing to do with Russian collusion and illustrates how the special counsel has gotten off track from the original purpose of the investigation,” Kobach said.

Mueller was tasked with investigating links between the Russian government and the Trump campaign as well as matters arising directly from the investigation. A federal judge has previously said that Manafort’s prosecution falls squarely within Mueller’s authority.

Kobach will face Democratic Sen. Laura Kelly and independent Greg Orman in the general election along with other candidates. It’s unclear whether the prosecutions of former Trump associates and other ongoing investigations will damage Kobach politically.

Orman’s campaign declined to comment for this story. Kelly campaign spokeswoman Johanna Warshaw said Kelly is focused on solving the challenges facing the state.

“It’s clear that Kansans are ready to move past the partisanship and bickering that defines Kris Kobach and the (Sam) Brownback experiment,” Warshaw said.

Kobach maintains close ties to Trump as well as Donald Trump Jr.

Kobach has said he speaks regularly with the president, often about immigration. He also served as vice chair on Trump’s Election Integrity Commission before it was disbanded.

Trump Jr. came to Kansas twice during the primary campaign to stump for Kobach, who has said he expects President Trump will come to Kansas in support of him this fall.

The day before the polls closed in the Republican primary, Trump endorsed Kobach in a tweet. Kobach later said the endorsement was important in pushing him over the edge in the razor-thin race.

Rep. John Carmichael, D-Wichita, said Kobach’s comments made clear he and Trump are “two peas in a pod.”

“It’s obvious that Kris Kobach is a Donald Trump loyalist and we saw just yesterday two Donald Trump loyalists who are apparently on their way to prison,” Carmichael said.

After news of Manafort’s conviction and Cohen’s guilty plea Tuesday, both men spoke about illegal immigration and the case of Mollie Tibbetts, a college student found dead in Iowa early Tuesday. The authorities have charged an undocumented immigrant from Mexico in the killing.

In a statement, Kobach said that “all too often, illegal immigration has tragic consequences.” At a rally on Tuesday night, Trump invoked Tibbets’ death in calling for tougher immigration laws.

At a news conference the day after Kobach won the Republican primary, he named his position on illegal immigration as his first similarity with Trump and said he expects the president to help him win the governor’s office in November.

“I’m very pleased and honored to be associated with President Trump,” Kobach said.