Last fall, 46 New York state judges received a shocking and distressing message from a state court administrative board: They were told that when they turned 70, as some already had, they were to clear out their offices, hang up their robes and enter into forced retirement.

Technically, what the board did was legal. New York does have a retirement age of 70 for its judges. But the state also allows the judges to apply for three additional two-year terms, and as long as they are competent those extra terms are granted almost automatically. So the effective retirement age has been 76, not 70.

The state judicial system wasn't claiming the 46 were incompetent — it really wasn't claiming anything. It just wanted to save money. The state's chief judge, Janet DiFiore, declared that the courts were in a financial bind and that getting rid of the veteran judges would save $55 million over a two-year period. Otherwise, DiFiore said, the system would have to lay off as many as 324 lower-level court employees. So the older judges had to go, no matter how effectively they might have been performing.

Stunned by the dismissal, the 46 judges did something they had never contemplated doing before. They sued the state — for age discrimination. And on Dec. 30, they got what they wanted. A Suffolk County judge annulled the entire order, calling it "arbitrary and capricious, unconstitutional and discriminatory." As I write this, that decision is under appeal, but for now at least the 46 unlucky jurists can all return to work.

RETIREMENT IS A VOLATILE ISSUE these days, with a baby boom cohort of more than 70 million people having to come to terms with it, but mandatory retirement ages are rarely applied to elected officials or political appointees. Except for judges. When it comes to judges, the question of how long they should be allowed to serve never quite goes away.

This has led to some bizarre situations. Vermont is one of the 32 states that set mandatory retirement ages for judges, and a couple of decades ago it seriously debated raising that age to 110. There was actually a reason for this: The state constitution called for mandatory judicial retirement, but left the exact age up to the Legislature. The Legislature, influenced by the example of the state's most revered jurist, F. Ray Keyser Sr., who was still dispensing justice effectively in his late 80s, didn't want any retirement age at all. So lawmakers came up with the idea of mandating an age nobody would ever reach. Fearing that 110 might look a little silly, they eventually decided on 90 as seemingly less eccentric. To this day, Vermont's mandatory judicial retirement age of 90 for its state judges is the highest in the country by nearly 15 years.

The question of judicial retirement goes back all the way to the early days of the republic. In the Federalist No. 79, Alexander Hamilton argued forcefully against mandatory retirement for jurists, citing "the imaginary danger of a superannuated bench" and insisting that few "outlive the season of intellectual vigor." At the time, Hamilton's home state of New York had a retirement age of 60 for judges, and Hamilton thought that was ridiculous.

His argument made sense. The average life span of Americans at that time was about 40, so even though age 60 was 20 years beyond that, there were few cases of superannuated judges turning senile. Average life span plus 20 to 30 years came to be a retirement standard that most American states considered reasonable.

It isn't reasonable now, though. The average American now lives to be 78, so life span plus 25 would give us a retirement age of 103, which not even the legendary F. Ray Keyser Sr. was able to reach, although he came close, passing away in 2001 at the age of 102.

THESE DAYS, MANDATORY RETIREMENT FOR JUDGES is standard practice in most of the developed world, with the United States a partial outlier. Its limits apply only to state judges — there is no mandatory retirement age for the federal judiciary. The U.S. Senate passed a bill in 1954 establishing a ceiling of 75 for federal judges, but it never became law.

There are plausible reasons not to force retirement on 70-year-old judges. First, there is the problem of losing people with decades of experience and stable judgment. Beyond that, some argue that governors will appoint high-ranking judges in their 30s and early 40s to give political allies extra decades to implement their preferred ideology. This further thins out the level of valuable experience on the bench. Take away mandatory retirement, and the imbalance recedes.

It's sometimes argued that forcing older judges out of office helps generate the new ideas that young jurists are able to supply. I can't speak for anyone else, but personally I don't really want freshly minted jurists experimenting with new ideas from a position of power. Legislatures can do that. I much prefer judges with the wisdom and stability to respect valid precedent and correctly interpret old ideas. Unlike a century ago, many states have commissions with the power to rule on situations of obvious incompetence, so the prospects of a demented jurist wielding an important gavel have been significantly reduced, even if they have not been eliminated entirely. As long as they stay separated from politics, these commissions seem to me the right way to keep things in order.

Whatever the merits of the question, the fact is that three-fifths of the states currently have mandatory retirement ages for judges, with 70 the most common standard. Many of these states do allow judges to continue on senior status to relieve overburdened colleagues, but in some cases senior status simply means availability for routine administrative chores.

Over the past generation, there have been attempts by legislatures in a number of states to adjust or abolish mandatory judicial retirement. These efforts reached state ballots 11 times between 1995 and 2016. Nearly all of them failed. The one notable victory, and it was an extremely close one, came in 2016 in Pennsylvania, which raised its judicial retirement age from 70 to 75. That same year, legislators in Oregon tried to go further, placing a measure on state ballots to eliminate mandatory retirement for judges altogether. The state's voters turned it down.

BY NOW, you are probably thinking of the same question I am: If mandatory retirement makes sense for judges, why don't we have it for other sectors of American government, for legislators and governors? There's one simple answer, but it isn't a very good one: Lawmakers and state executives are required to run for re-election at regular intervals; if voters think they are too old, they can be removed at the polls. The reason that's not a good reason is that entrenched incumbents can be (and generally are) returned to office at practically any age, regardless of evident mental capacity. The advantages of seniority help them win re-election. Strom Thurmond held on in the U.S. Senate until the age of 100, but for his last decade at least, he wasn't much of a legislator.

But for every Thurmond there has been a Robert Byrd, still as sharp as ever in the Senate as he entered his 90s, or a Jerry Brown, the four-term governor of California who, by common consensus, enjoyed his most successful statehouse years in his 70s and continued running the state effectively until his retirement in 2019, at the age of 80.

Ironic as it may seem, we are currently being governed at the federal level by what amounts to a gerontocracy. The president of the United States is 78; the speaker of the House is 80; the Republican leader in the Senate will be 79 next month. I'm not an uncritical admirer of any of these people, but I would be hard-pressed to claim that any of them have, to use Alexander Hamilton's words, outlived their season of intellectual vigor.

Given the conspicuous competence of all these elderly politicians (and many more I won't bother naming), it seems to me — and I think to most Americans — that it would be foolish to slap a mandatory retirement age on them.

And if that's the case, then why exactly do we need to impose one on judges? If you are wedded to the idea that they should step down at age 70, you probably should consider the career of Oliver Wendell Holmes Jr., rightly considered the most eloquent and sagacious of all the justices who have served on the U.S. Supreme Court since the 19th century.

With a retirement age of 70, Holmes quite possibly wouldn't have been appointed in the first place at 61. Even if he had remained until 80, some of his most important decisions would never have been handed down. As it turned out, Holmes continued to set an example for the entire legal profession until shortly before his retirement in 1932 at age 90.

I wrote a long time ago that even one Holmes every few decades is worth a little messiness around the edges. I still think that's true. I think it's as true of the New York state court system as it is of the rest of American jurisprudence.