? A long-running school finance case is proving costly for the state of Kansas and four school districts that filed the lawsuit.

State Republican leaders argue money spent on the case could be used instead in classrooms. But an attorney for the Wichita school district contends the legal fees are small compared with the money on the line for the districts, which allege the state is not adequately funding schools.

The state has spent $1.4 million on outside counsel, which doesn’t include costs for eight attorneys in the attorney general’s office who have worked on the case since 2010, The Wichita Eagle reported.

The Wichita district has spent more than $1.6 million since the case began in 2010. The Kansas City, Kan., school district has spent nearly $700,000 during the same period. Dodge City spent about $220,000 between February 2010 and July 2015 and Hutchinson spent about $183,000 during that period.

The case, Gannon v. State of Kansas, has moved between district courts and the Kansas Supreme Court for the past six years. Earlier this month, the state Supreme Court ruled the state school funding was inequitable. Lawmakers must address the decision before July 1 or risk the closing of some state schools.

“Everybody’s tired of this,” said John Robb, a Newton attorney representing the school districts. “But just because we’re tired of it doesn’t mean we’re going to throw the kids under the bus until it’s fixed.”

Gov. Sam Brownback’s spokeswoman, Eileen Hawley, said in an email that “raiding classroom dollars and repurposing them for endless litigation does not serve Kansas students well.”

Ray Hemman, spokesman for the Hutchinson district, said the case has been a net gain for the district’s taxpayers. A 2014 Kansas Supreme Court order to increase equalization aid resulted in $1 million more in state aid for the district over two years.

Rep. Ron Ryckman, R-Olathe, the House Appropriations chair, said Friday, “it would be best if the Legislature and the schools can work together to come up with a funding solution that’s best for our kids and not just provide a revenue stream for attorneys that does divert money from our schools.”

Sen. Laura Kelly, D-Topeka, blamed the Legislature.

“We are consistently putting the school districts in this position of having to decide to sue by passing school budgets that we know to be unconstitutional,” she said.

Even after lawmakers respond to the court’s order to ensure equity in school funding, the court will have to decide the larger question of whether school funding is adequate. A decision in the districts’ favor could result in hundreds of millions more dollars a year for schools across the state.