THE THREE-WAY Democratic primary contest for Montgomery County executive is a rare race among rival candidates whose competence, commitment and honesty are all beyond doubt. Former county executive Douglas Duncan, whose achievements in office a decade ago are visible today in steel and concrete, is running against the incumbent, Isiah Leggett, who has deftly managed the county through the recession. The third candidate, Phil Andrews, a 16-year veteran of the county council, is a principled reformer who has often been the county’s moral and fiscal conscience.

Any one of them would make an able county executive in Montgomery, where one in six Marylanders live. Our choice is Mr. Leggett — with a caveat.

Mr. Leggett is a skilled, strategically savvy leader who is widely admired for his civility and political acuity. The caveat is that he is also at least in part the candidate of the status quo. And in Montgomery, the status quo is not quite right.

In endorsing him in the June 24 primary, we are hoping that Mr. Leggett will intensify the challenge he has posed in recent years to the county’s entrenched interests. Chief among those interests are Montgomery’s public employee unions.

Bloated with a sense of entitlement, the unions are the chief threat to good government, sound fiscal policy and economic growth in the county. They have extracted concessions from elected officials far in excess of those granted by similar suburban jurisdictions, not to mention the private sector. Some of these concessions have been subject to abuse, particularly in the case of the police department.

Yet the unions’ political muscle makes politicians extremely reluctant to challenge them head-on. And without a head-on challenge, Montgomery will inevitably fall further behind its chief regional rival, Fairfax County, in the competition to attract new business and the prosperity that follows.

On taking office in 2006, Mr. Leggett signed profligate wage and benefit increases. Then, forced to retrench in the recession, he showed his spine. He took on the unions and went to court to roll back what were clearly unaffordable compensation packages. He has paid a political price for that, but, characteristically, he has mended fences as the current election approached. This year he has backed overgenerous wage increases as well as an increase in school spending that will be hard to sustain when the next economic slowdown hits.

Mr. Duncan, who led the county from 1994 to 2006, was an effective executive despite his tendency to bully the county council. He had important and enduring successes, including the impressive redevelopment of Silver Spring — once dilapidated and dangerous, now dynamic — and the building of the music center at Strathmore.

But Mr. Duncan also coddled the unions with massive increases in wages and benefits, partly in order to galvanize his base as he prepared what ultimately was an unsuccessful race for governor. Those increases, which drove overall spending hikes exceeding 40 percent in Mr. Duncan’s last four years in office, were a fiscal time bomb that exploded in county politics when the recession hit.

No one questions Mr. Duncan’s abilities, and there is much to admire about his spirit and strength of character. He has rebounded from severe depression that had prompted him to abandon his race for the Democratic gubernatorial nomination in 2006, and he mounted what he knew would be an uphill race for county executive. His openness about grappling with depression has been an inspiration to others suffering from the disease.

However, we are unconvinced that Mr. Duncan has learned the right lessons from his spending spree of a decade ago. He argues that he retains a Midas touch for attracting business to the county and that he can spur a new golden age of tech-oriented investment and economic growth. Yet without a simultaneous commitment to fiscal restraint of the sort that was lacking in Mr. Duncan’s last term running the county, we doubt his economic plan is viable.

Mr. Andrews — bright, patient, self-effacing, ethical — has been a clear-eyed advocate for taxpayers and for responsible levels of taxes and spending in a highly diverse county. While most other members of the county council quailed in the face of threats from the unions, Mr. Andrews was the one steady and civil voice of restraint. He turned the tide against a scheme to grant pension increases to county retirees based on pay increases that had been canceled. And he led the charge against a foolish state law that makes it virtually impossible to roll back per-pupil funding increases in the county’s schools budget.

Andrews is a supremely energetic campaigner running a badly underfunded campaign. To avoid potential conflicts of interest, he accepts no campaign cash from any group; both Mr. Leggett and Mr. Duncan are outspending him heavily. This has helped cement his status as a maverick — admired, but regarded as a lone wolf. It is notable that after all his years on the county council, none of Mr. Andrews’s colleagues, past or present, is supporting his candidacy for county executive.

That suggests Mr. Andrews is better at building respect than coalitions. Yet the county executive needs to be able to make compromises and deal squarely with the county’s business leaders while maintaining principles. Mr. Leggett has excelled at that.

Few local leaders are as adept as Mr. Leggett at balancing competing, and sometimes warring, interests. Few have been as shrewd at mending fences after a bruising fight, as he has done to some degree with the unions. Few have his divining rod for common ground and consensus. Those have been the critical skills he has used to steer the county through budgetary turmoil. If he continues to reorient Montgomery toward fiscal restraint and economic competitiveness, he will have made good use of his political agility.