TOPEKA, Kan. (AP) — Kansas is bracing for more contentious legal and political fights over education funding even after legislators approved a narrow, short-term fix to satisfy a court mandate and avoid a threatened shutdown of the state’s public schools.

Having directed lawmakers to make education funding fairer to poor areas, the Kansas Supreme Court will next consider the larger issue of whether the state spends enough overall on its schools. The justices could rule by early next year; a trial-court panel said the state must increase its annual aid by at least $548 million.

Republican Gov. Sam Brownback and the GOP-dominated Legislature’s leaders already have committed to rewriting school funding laws next year. Besides overhauling how money is distributed among the state’s 286 local districts, they also want to rethink academic standards and use state funds to improve students’ performance.

Kansas is likely to remain mired in the budget problems that have plagued it since Brownback persuaded lawmakers to slash personal income taxes in 2012 and 2013. Any large increase in school spending — whether to comply with a court order or smooth the way for a new funding formula — would require lawmakers to reconsider his signature tax cuts.

“We will have a challenging time with all of those things going on at once,” said state Rep. Russ Jennings, a moderate Republican from Lakin in southwest Kansas. “Get your popcorn. Grab a seat. The circus will be back in town.”

Legislators wrapped up a two-day special session Friday after approving a plan to increase aid to poor school districts by $38 million.

Brownback called the session to respond to a state Supreme Court ruling last month that the education funding system remained unfair to poor school districts, despite three rounds of changes in education finance laws in three years. The justices warned that schools might not be able to reopen after June 30 if lawmakers didn’t make more changes.

The total spending at issue was less than 1 percent of the more than $4 billion a year Kansas already spends on its schools. Lawmakers cobbled together a bipartisan plan to divert funds from other corners of state government to avoid an overall increase in state spending.

Kansas has been in and out of legal battles over education funding for decades, as have other states, most notably New Jersey. The latest round in Kansas began with a lawsuit filed in 2010 by the Dodge City, Hutchinson, Wichita and Kansas City, Kansas, districts.

Amid the litigation, Republican legislators last year junked the state’s 1990s-era per-pupil funding formula in favor of predictable grants to districts that allowed lawmakers to better control state spending. But GOP leaders never intended the grant system to continue beyond June 2017.

“We need to get some permanent structure in school finance,” said state Senate Majority Leader Terry Bruce, a conservative Nickerson Republican.

Drafting a new funding formula ratchets up regional tensions, as lawmakers from different areas scramble to prevent their schools from seeing their aid redistributed elsewhere.

The state Supreme Court has ruled that the Kansas Constitution requires legislators to finance a suitable education for all children, whether they live in rich and poor areas. The state’s funding system can’t allow wealthy districts to get too far ahead of poorer ones, the court has said.

“We have solved the equity problem, but there is still work to do to establish a school finance formula that provides adequate funding,” said state House Minority Leader Tom Burroughs, a Kansas City Democrat.

Education funding debates often pit poor districts and small, rural ones against affluent districts in the Kansas City suburbs of Johnson County, the state’s most populous county.

Educators across the state argue that regional tensions would ease if Kansas increased its overall spending on schools. But Brownback, who blames the state’s ongoing fiscal woes on larger regional and national economic issues, said the budget will remain “very tight.”

Dayna Miller, a Republican business owner who serves on school board for the 2,500-student Basehor-Linwood district west of Kansas City, said: “We should be looking at revenues and how to increase those.”

___

Follow John Hanna on Twitter at https://twitter.com/apjdhanna .

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.