KANSAS CITY, Mo. — Kris Kobach was in the middle of running for Kansas governor in December 2017, but he had unfinished business in Nebraska.

The former Kansas secretary of state helped write an ordinance in 2010 for Fremont, Neb., banning landlords from renting homes to immigrants living in the country illegally. Four years later, he successfully defended his handiwork on behalf of the town all the way to the Eighth Circuit Court of Appeals.

His legal victory attracted national attention. Still, enforcing the law had proven difficult because information collected on rental applications wasn't enough for the federal government to determine whether someone was in the country legally.

But Kobach wasn't ready to give up.

So in 2017, while still receiving a $10,000-a-year retainer from Fremont, he emailed the acting director of U.S. Immigration and Customs Enforcement with a list of 289 people who had applied for an occupancy license in the eastern Nebraska city, where about 15% of its 26,000 residents are Hispanic.

Kobach wanted to determine if any of the people on this list were in the country illegally, and asked ICE to "verify the immigration status" of each individual.

He also went a step further, hinting that if the information he provided led to anyone being arrested or deported he'd be fine with that.

"The Fremont ordinance permits the city to share any information on the alien's application with ICE for ICE's own purposes," Kobach wrote to the acting director of ICE, Thomas Homan. "So if your agents want to use that information for ICE enforcement operations, the ordinance contemplates that."

Homan appeared skeptical. In his response he cautioned against drawing any conclusions about an individual's immigration status based on an occupancy license. Kobach's email never resulted in any action by ICE.

Kobach, who is now running for U.S. Senate after losing the 2018 governor's race, has made hardline stances against illegal immigration a cornerstone of his political career. The emails show Kobach pushing ICE — under the control of President Donald Trump — to aid Fremont years after the city's ordinance had been written off as unenforceable.

Critics say the emails — obtained through a Freedom of Information Act request by the government watchdog American Oversight — demonstrate Kobach's worrisome level of access to top immigration officials in the Trump Administration.

And some contend the 2017 back-and-forth between Kobach and ICE could reopen previous litigation challenging the constitutionality of the Fremont ordinance.

"Kris Kobach has made a career of scaremongering around undocumented immigrants voting and using public services, and has driven public policy in ways that do not match the actual evidence," said Austin Evers, executive director of American Oversight. "In this case, he used the power of government to compile a list of individuals and, if he had his way, to have ICE just sort of rummage through them."

In an email to The Star and The Eagle, Kobach said he was working to carry out the requirements of the ordinance, at the direction of Fremont city officials, when he reached out to ICE in 2017.

"The ordinance has been very successful in reducing the harboring of illegal aliens in Fremont and in protecting U.S. citizens against illegal competition for their jobs," Kobach said. "Indeed, the ordinance has been so successful that the voters of the town of Scribner, Neb., adopted a virtually identical ordinance in November 2018."

Fremont resident John Wiegert, who spearheaded the effort to pass the ordinance, called it an "honor" to know Kobach, adding that he's "a great man, highly intelligent."

He praised Kobach for trying to enforce the measure, which he acknowledged isn't perfect.

"Something is better than nothing and even if it's more of a deterrent of 'Oh, they have an ordinance, I'm not moving to that town,'" Wiegert said.

When Fremont voters approved the immigration ordinance in 2010, the election kicked off a four-year legal struggle over its fate.

The meatpacking plants surrounding the town had drawn an increasing number of immigrants over the last two decades, especially Latinos.

The ordinance requires landlords to obtain an occupancy license from anyone renting property. On the $5 license, renters must mark whether they're U.S. citizens or non-citizens. Under the city law, landlords may be prosecuted for renting to people in the country illegally.

The ACLU of Nebraska sued a month later, alleging the ordinance encourages discrimination and racial profiling against Latinos.

Fremont turned to Kobach, who helped author the ordinance, to defend it.

Kobach's work for Fremont is part of a body of immigration-related legal representation that has often proven costly to municipal governments. An investigation last year by The Star and ProPublica found that Kobach has been paid more than $800,000 for immigration work by towns and advocacy groups.

Fremont alone has paid Kobach more than $100,000.

His defense of the Fremont ordinance was successful — at least in terms of the law.

In 2014, the Eight Circuit Court of Appeals ruled the ordinance was not preempted by federal law. The court said the ordinance does not "remove aliens from this country (or even the City), nor do they create a parallel local process to determine an alien's removability."

But victory was ultimately empty. The rental application didn't include the information needed to determine citizenship status.

The ordinance went fully into effect in 2014, but has been thought unenforceable, even though Kobach's 2017 email to ICE shows he didn't see it that way.

Kobach wrote Homan requesting that his agency inspect a list of 289 names of people who applied for city occupancy licenses from April 2014 to March 2017.

"If you could assign someone to determine the immigration status of each alien and add that to the attached word file, that would be great," Kobach wrote.

Homan responded that Kobach needed to show that he is asking for this info as a legal representative of the Fremont police, or that Fremont can make the inquiry directly.

He also clarified that just because ICE doesn't have records on an individual or cannot disclose information, the city shouldn't take that to mean the person is in the country unlawfully.

But it was Kobach's suggestion in the emails that ICE was free to use the information he provided for possible enforcement actions that has his critics crying foul.

Matthew Hoppock, an Overland Park immigration attorney, said he has always believed the purpose of the Fremont ordinance was "to scare immigrants from living in the town, because by having to apply for an occupancy license, the person was risking having their information given to ICE.

"They won in court," Hoppock said, "largely by convincing the court that wasn't the purpose."

But the emails between Kobach and ICE appear to undercut that argument, Hoppock said.

The town and Kobach were "not only asking for the immigration status," Hoppock said, "but also telling ICE it ought to use this identification for ICE 'enforcement operations.'"

After the Fremont ordinance was upheld by the Eighth Circuit, many expected other localities would quickly follow the city's example.

"Our victory over the ACLU in court has paved the way for other cities to adopt ordinances patterned after this one," Kobach said, pointing specifically to Scribner, Neb., approving a similar ordinance last year.

But the heavy legal costs that often come with defending these laws have acted as a deterrent for many communities, said Dan Stein, president of the Federation for American Immigration Reform (FAIR).

"The question is how much time and effort localities want to spend litigate these," he said.

Stein praised Kobach's focus on illegal immigration, saying he "deserves a lot of credit for elevating this cause to a national stage."

"Kris Kobach himself was a major engine behind states and localities considering these kinds of issues," he said, later adding: "To most voters, the positions Kobach has taken is what we would call common sense."

After a failed effort to partly repeal Fremont's ordinance in 2014, the law has faded as a significant local issue.

"I would say most of us are sick of it," said Michelle Knapp, a Fremont resident who helped lead the 2014 campaign in favor of rolling back the measure.

Even as the community tries to move on, Kobach has maintained his connection to the city.

In December, Fremont's city council unanimously approved keeping Kobach on retainer for another year. Mark Jensen, a city councilman, said he won't vote for it again.

"We're throwing money down a hole as far as I'm concerned," Jensen said.

Jensen, who joined the council last year, said he didn't have any knowledge of Kobach sending suspected undocumented immigrants to ICE.

Several other council members didn't respond to inquiries. Local officials approached by The Star by and large had little to say about Kobach's work for the city.

Mayor Scott Getzschman said in an email that Fremont's city attorney would have had to provide Kobach with the list of those who applied for occupancy licenses and said they were non-citizens. The attorney is no longer with the city, however, he noted.

Asked whether Fremont or one of its departments instructed Kobach to send the list to ICE, city administrator Brian Newton said "I don't have any information about your questions." He directed questions to Kobach.

Wiegert, who led efforts to pass the ordinance, said hard feelings probably still remain in the city over the fight about the measure. But he stands by the ordinance, saying "I want legal people" in Fremont.

He also rejects the idea that racism drove the ordinance.

"They throw that out because that's the easiest thing to say," Wiegert said.

But John Crabtree, who supported an unsuccessful 2014 effort to partially repeal the measure while working for the Center for Rural Affairs in nearby Lyons, Neb., said the ordinance had harmed the public's perception of Fremont.

Now it's seen as a place with bigots and racists, he contends.

"I don't believe Fremont is any worse than any other community," Crabtree said. "But we have a reputation as being worse. And to me, that's the big price tag."