Kansas defended its new school funding fix on Tuesday before the state supreme court, which must determine if the law complies with a February order to equitably distribute state money and keep schools operating past June 30.

Stephen McAllister, the state’s solicitor general, said the plan signed into law by Governor Sam Brownback in April represents the best the legislature could do to narrow funding disparities among poor and rich school districts in a tough budget year.

“No one has come up with a way to make each district exactly equal,” he told the justices, adding that the law represents a one-year solution to keep schools open while the legislature continues to work on the issue.

Justice Dan Biles questioned how long Kansas would have to operate under “unconstitutional” school funding formulas that have been the target of litigation for years.

“At what point does this process have to stop?” he asked.

Alan Rupe, an attorney representing four public school districts that sued the state, said the new law does not remedy the inequity problem. He urged justices to force Kansas lawmakers meet the state constitution’s requirement to make schools a top priority by restricting spending on other government services not constitutionally protected.

McAllister called such a move an “unprecedented remedy,” noting Kansas has allocated $4.5 billion for public schools.

The supreme court in February tossed out a funding formula enacted by the state in 2015 and set a June 30 deadline for Kansas to replace it with a constitutional plan, warning that without one schools would cease to operate.

The new formula takes into account the assessed valuation of property within a district on a per pupil basis and adopts a previously court-approved capital outlay equalization formula.

Kansas last month dropped revenue estimates for the current and next fiscal years by nearly $229 million. The state budget is feeling the effects from action taken by Brownback and the Republican-controlled legislature in recent years to cut corporate and other income taxes to help the state compete with bordering Missouri and other states for business development and jobs.

The state’s reliance on one-time revenue measures to plug budget holes led Moody’s Investors Service to place a negative outlook on Kansas’ Aa2 credit rating and Standard & Poor’s to warn it could downgrade its AA rating.