By ROXANA HEGEMAN, Associated Press

WICHITA, Kan. (AP) — Democrat Laura Kelly accused Republican Kris Kobach of not being truthful when he claimed during a televised debate Tuesday that Kansas can save $377 million a year by cutting off benefits and services to immigrants living in the U.S. illegally.

Kobach, in turn, argued that Kelly was lying when she said that he wants to cut school spending.

The contentious exchanges came as the candidates for Kansas governor faced questions about taxes, school funding and immigration in a hotly contested race where Kelly previously accused Kobach of not supporting public education, and Kobach has tried to translate a rally with President Donald Trump into momentum in the campaign's final weeks. The debate at television station KWCH in Wichita also included independents Greg Orman and Rick Kloos and Libertarian Jeff Caldwell.

Kelly contended the claim that the state could save millions by cutting off benefits to immigrants is untrue because people living in the U.S. illegally are not eligible for welfare benefits.

The other testy exchange occurred during questions about school funding and whether the candidates favored returning to the tax-cutting experiment of former Gov. Sam Brownback.

"When we talk about going back to the Brownback experiment, which is what Kris Kobach wants to do, we are talking about cutting our schools again — so we go back to larger class sizes, programs being cut, teachers leaving our state," Kelly said. "We don't want that, we can do better for our kids."

Kobach argued the state has to be smart on how it spends money on education so more of it goes into the classroom, and he hit back on the contention he wants to cut funding.

"Ms. Kelly continues to repeat a lie over and over again ... claiming I say schools are overfunded and I want to cut school spending. That is a falsehood. I have never said that," Kobach said.

Kansas legislators have boosted spending on public schools in response to rulings in recent years by the state Supreme Court in a lawsuit filed by four local school districts. Lawmakers this year phased in a $548 million increase over five years to avoid raising taxes.

Kobach has criticized the court for its rulings and has suggested this year's increase in spending amounted to a "ransom." He's also been sharply critical of how some school districts spend their dollars and argues that they wouldn't need big increases if they spent more money in the classroom.

The Republican has said he wants to require districts to spend 75 percent of their dollars in their classrooms. The State Department of Education said they spend about 61 percent on classroom instruction alone, a figure that does not include spending on support staff such as nurses and counselors.

Kelly and Kobach have sparred over her claim in television ads that he is calling schools overfunded. Kobach said he hasn't used those words and demanded that she change the ad. He has also been critical of how the state funds education and how school districts spend taxpayer money.

Kobach, secretary of state since 2011, is nationally known for advocating tough immigration and voter identification policies and was Trump's most visible early supporter in Kansas. He served as vice chairman of the president's now-disbanded election fraud commission and narrowly won the GOP primary over Gov. Jeff Colyer after Trump tweeted his endorsement the day before the election.

Kelly first won her Senate seat in her GOP-leaning Topeka area district in 2004, and she's the top Democrat on the Senate budget committee.

Orman, a Kansas City-area businessman, received national attention as an independent candidate for the U.S. Senate in 2014 against veteran Republican incumbent Pat Roberts. Enough Democrats rallied behind him then that the Democratic nominee dropped out, though Roberts still won. Democrats now largely view Orman as a potential spoiler.