By Kurtis Lee

The race for the Republican nomination for Kansas governor -- a contest in which President Donald Trump endorsed his close political ally Kris Kobach -- was too close to call late Tuesday.

With 86 percent of precincts reporting results and more than 266,000 votes tallied, Kobach held a lead of 859 votes over incumbent Jeff Colyer, a moderate seeking his first full term after replacing Sam Brownback, who resigned as governor in January to serve in the Trump administration as ambassador-at-large for international religious freedom.

Few candidates across the country have been as closely allied with Trump as Kobach.

Shortly after the 2016 presidential election, Trump appointed Kobach to his immigration policy team. Months later, in May 2017, Trump tapped him to team up with Vice President Mike Pence to head a now-defunct commission on voter fraud.

Throughout the primary campaign, Kobach focused heavily on curbing illegal immigration and frequently dropped Trump's name in interviews, praising the administration's "zero-tolerance" policy that has separated immigrant families that entered the country illegally.

Trump, in an endorsement on Monday, called Kobach, who is Kansas secretary of state, a "fantastic guy" who will be strong on immigration and crime.

Not all Republicans thought the endorsement was a good idea. Some in Washington had urged Trump to stay out of the race, fearing that a Kobach win could lower turnout this fall by moderates and hurt the party in a pair of competitive congressional races.

Colyer shares Kobach's views on immigration but focused his campaign on issues surrounding the state's budget woes, which began in 2012 when Brownback ushered in massive tax cuts. (Colyer was Brownback's lieutenant governor at the time.)

In November, the winner will face state Sen. Laura Kelly, who won the Democratic primary.

Kansas leans Republican and hasn't elected a Democratic governor since 2006. Democrats would prefer to face Kobach in general election, hoping his candidacy would energize their base and turn off moderates.

If Colyer wins, the Democratic strategy will be to tie him to the unpopular Brownback with the aim of boosting turnout in a handful of moderate and left-leaning pockets in college towns like Lawrence and Manhattan.

Kobach has been at the forefront of national efforts to reduce illegal immigration.

In 2010, he helped craft Arizona's controversial immigration-enforcement legislation _ Senate Bill 1070, the so-called "show your papers" law. Critics said the law hinged on racial profiling, and the Supreme Court eventually stuck down many of the provisions.

He also helped local officials in Hazleton, Pa., draft a 2006 ordinance that banned landlords from renting to people in the country illegally. The ordinance faced several legal challenges and was never implemented.

In June, a federal judge struck down a 2011 Kansas law that Kobach said was aimed at ending voter fraud by requiring people to show proof of citizenship to register to vote. Opponents argued the law aimed to reduce registration of blacks and Latinos, who tend to vote Democratic.

Recently, the same judge ordered Kobach to pay more than $26,000 in legal fees to the American Civil Liberties Union and a related legal team stemming from the fight over Kansas' proof-of-citizenship voting law.

(c)2018 Los Angeles Times