A JUDGE IN Montgomery County has ruled that the county executive owes primary responsibility in drafting his annual budget to — surprise! — his constituents.

That conclusion, reached by circuit court judge Ronald B. Rubin last week, may seem absurdly obvious. But it injects a note of common sense into the escalating dispute between the county government and its public employee unions. The unions’ years-long aura of invincibility seems to be fading in the face of Montgomery’s inability to sustain excessive salaries and benefits for county workers.

The ruling is a milestone in the dispute between County Executive Isiah Leggett, a Democrat, and the police union, which sued him for seeking to roll back compensation for its members. In effect, the judge’s decision simply reaffirmed Mr. Leggett’s obligation to submit a budget that reflects his best judgment, which is surely what voters expect of him.

The union insisted that Mr. Leggett honor the decision of unelected arbitrators, who, by the way, side with the unions about 90 percent of the time. If the union had prevailed, it would have tied the hands of Mr. Leggett and his successors, forcing them to make budget proposals that clashed with their vision and values.

County employees are crucial to the quality of life in Montgomery County, and they should be fairly compensated. But Mr. Leggett is right that his allegiance is to the county as a whole and its 1 million residents. He would rather spread the pain of budget cuts — including to county workers — than let it fall exclusively on libraries, parks, social services and other government functions already badly hit by three years of budget cuts.

In response to the judge’s ruling, union leaders threatened to bypass the county executive and take their case directly to the county council, which controls the purse strings. In fact, that has always been the unions’ prerogative, and they have hardly stinted in seeking to influence council members with campaign contributions and political activism.

The council in turn is within its rights to rewrite Mr. Leggett’s proposals. Some council members have said his budget, as submitted, inflicts too much pain on government workers, some of whose whose health benefits would be sharply curtailed, and not enough, on teachers and other school employees. That may be the case.

Still, the council will have to find $30 million in savings to balance the county’s budget of more than $4 billion. That’s the same amount Mr. Leggett insisted on in his blueprint; there are no shortcuts.

The judge’s ruling leaves the county with a system that makes little sense, as we’ve said before and as Mr. Leggett and union leaders would probably agree. They can go to “binding arbitration,” but the results are neither binding nor useful. The only way to overcome what have become perennial impasses between Montgomery and its labor force is to reform the process by which union contracts are negotiated and settled.