WITH THE aid of budgetary sleight of hand, Montgomery County has papered over the latest dispute over funding between the County Council, which holds the purse strings, and the school system, which accounts for more than half of the jurisdiction’s spending. The school system got every penny of the $2.3 billion it wanted — but with a catch that protects county taxpayers from a state law that locks in the increase in perpetuity.

The deal resolves for now what has become a venomous, perennial dispute between the county and the schools, the stakes of which have been driven higher by the senseless law , known as maintenance of effort. The law makes it all but impossible for counties to trim education spending during economic downturns — even if they have pumped up school spending in good times.

Understandably, that law — enacted by state legislators at the behest of the teachers union — has made council members in Montgomery extremely wary of exceeding per-pupil minimum spending mandated by Annapolis. Yet the county school system, by far Maryland’s largest and one of the United States’ 20 biggest, has kept up the pressure for budget increases that go beyond the state minimums.

When times were flush, Montgomery lavished funding on the schools year after year, to the tune of hundreds of millions of dollars in excess of the state-mandated per-pupil minimums. Then the recession hit, and county officials had to battle Annapolis for permission to scale down spending.

This year, Schools Superintendent Joshua P. Starr’s budget request was almost $52 million above the state-mandated minimum. That left county officials bristling but nervous about a public brawl in an election year for the local and state legislatures. County Executive Isiah Leggett (D) proposed an increase that gave the schools most of what they wanted — some from the county, the rest from the schools’ reserves.

The problem with Mr. Leggett’s proposal is that it would set a new spending base from which the county would have trouble retreating in a new recession. Council President Craig Rice (D-Upcounty) rode to the rescue with a counterproposal that delivered the schools’ full funding request but did not pad the per-pupil base.

Mr. Rice’s method involves pumping up a county pension fund for retired teachers’ health benefits, which allowed the schools to channel more of their own budget money for education. Yes, it’s gimmickry — but gimmickry that buys another year of relative peace in the county-school funding wars. Mr. Starr, Mr. Leggett, the school board and every member of the county council lined up behind what was essentially a truce.

That’s progress. But the fundamental problem remains the maintenance-of-effort law, which needs to be rewritten to allow counties to pare back spending for schools — as they routinely do for other expenses — in a downturn. With that flexibility, counties would be able to do right by schools in good times and protect taxpayers in bad times.