Kansas Gov. Jeff Colyer makes a point during a Republican gubernatorial primary debate, Saturday, June 23, 2018, in Salina, Kan. Colyer is battling Kansas Secretary of State Kris Kobach and has stepped up his attacks on Kobach's conservative credentials. (AP Photo/John Hanna)

Kansas Secretary of State Kris Kobach answers a question during a Republican gubernatorial primary debate, Saturday, June 23, 2018, in Salina, Kan. Kobach advocates tough state policies to crack down on illegal immigration and has made them a key part of his campaign to unseat GOP Gov. Jeff Colyer in the primary. (AP Photo/John Hanna)

Kansas Insurance Commissioner Ken Selzer, left, Gov. Jeff Colyer, center, and Secretary of State Kris Kobach, right, await the start of a Republican gubernatorial primary debate, Saturday, June 23, 2018, in Salina, Kan. Immigration remains a key issue for GOP voters as Colyer tries to fend of challenges from Selzer and Kobach, who is nationally known for advocating tough policies on illegal immigration. (AP Photo/John Hanna)

SALINA, Kan. (AP) — Kris Kobach's top Republican rivals are trying to sound the right notes on illegal immigration to appeal to business and agriculture leaders without conceding too many conservative votes to a hardliner who's made tougher state policies a key theme in an increasingly contentious race.

Kobach, the Kansas secretary of state, is trying to unseat Gov. Jeff Colyer in the state's Aug. 7 primary. He argued during a debate Saturday that Kansas is too lax in dealing with people living in the U.S. illegally, pushing initiatives such as requiring state contractors to verify the status of their workers.

The contest is being fought largely on the political right, and Colyer spent much of the debate attempting to undercut Kobach's conservative credentials, including his opposition to abortion . Colyer and the third major candidate participating in the debate, Insurance Commissioner Ken Selzer, decried illegal immigration and expressed support for President Donald Trump.

But Kobach could do them one better, noting that he has been advising Trump since the 2016 campaign. Even before that, he had a national reputation for helping to draft tough immigration policies in other states.

"I'm the only person here who's actually done something in his career about illegal immigration. I've been fighting it," Kobach told the crowd of about 300 people. "And, yeah, I have a relationship with president. I spoke with him just last week on the phone."

Illegal immigration surged as a political issue again amid the backlash against Trump's "zero tolerance" policy for illegal crossings of the U.S.-Mexico border and the forced separation of immigrant children from their parents. Trump on Wednesday issued an executive order to end family separations, but many Republican voters in Kansas remain behind his efforts to crack down.

The issue splits GOP legislators when they consider some of the issues Kobach has raised repeatedly, including repealing a 2004 state law that helps young immigrants in Kansas brought to the U.S. illegally by their parents to attend college by charging them the same, lower tuition rates as legal Kansas residents. Business and agriculture groups worry about cutting off a flow of workers, particularly in southwest Kansas.

Philip Hinman, a 28-year-old high school history teacher from McPherson, is a registered Republican who's undecided about the governor's race. He acknowledged feeling conflicted, balancing with his Christian faith, "just in terms of loving our neighbors and serving them when they're in need" with a respect for the law.

"Does that change our responsibilities as Christians to serve others?" he said. "It's something I still wrestle with."

Colyer said he'd sign a bill to repeal the tuition law and would send Kansas National Guard soldiers to the border if Trump asked.

But he also told reporters after the debate: "Washington, D.C., needs to get its act together and clean up the job."

Selzer said that the supply of labor is a key issue with immigration, and he supports efforts to allow legal — and, he emphasized, "fully screened" — workers stay in the U.S. longer for agricultural work.

But he also said ahead of the debate: "Voters want a secured border. That's the No. 1 priority."

Kobach has a solid base among conservatives and left the Salina debate for a fundraiser in the Kansas City-area with "Catch Scratch Fever" rocker and gun-rights provocateur Ted Nugent.

But part of Kobach's appeal for right-leaning voters is his visibility on immigration issues. Beverly Caley, a 68-year-old retired teacher from the small town of Green, attributed the recent uproar over immigration to "just the hatred for Donald Trump."

"You can't tell people who are enforcing the laws, 'Don't enforce them,'" she said.

Meanwhile, Kobach defended his seeking a pardon for a corporate campaign donor's vice president that Colyer recently denied because the police said the crime involved threatening a cab driver with a gun to the head.

Colyer asked whether Kobach would pardon Ryan Bader, who pleaded guilty to attempted robbery stemming from a 2009 cab ride after a round of drinking. Kobach, who was Bader's attorney for the pardon, accused Colyer of lying about the incident, saying a judge found a gun wasn't involved.

The judge who sentenced Bader checked a box on a sentencing form saying a deadly weapon wasn't involved. But a police affidavit said the cab driver reported the threat and a gun was found in Bader's home. His record was expunged in 2014.