This is a story choking with irony. Judges are supposed to adjudicate on age, sex and race discrimination, right? Not claim it is happening to them.

So, when nearly 200 of Her Majesty's judges accuse the government of all three forms of discrimination, something is very definitely amiss.

When those same judges then decide to sue the Lord Chancellor and the Ministry of Justice, you know that relations between two powerful arms of the constitution, the executive and the judiciary, are far from cordial.

So, why are they doing it? The answer lies in changes to the judicial pension - which the judges who are suing say will compromise the diversity of the bench.

For many years, it had an almost mythical quality. It was the magic ingredient that tempted the most able lawyers to give up lucrative careers in private practice, take a pay cut, and spend their latter years on the bench, safe in the knowledge that a gold-plated final salary pension awaited them on retirement.

In order to save public money, the government has introduced changes that have not gone down well with the younger members of the bench.

In the same court, two judges appointed on the same day to do the same work now have vastly different pensions Shubha Banerjee, Leigh Day

From 1 April of this year, judges born after 1 April 1957 will, under a new scheme, get smaller pensions that those born before 2 April 1957, who remain on the old "gold-plated" model.

How much smaller? According to solicitors Leigh Day - who are representing the 200 judges - those who have been forced out of the old scheme could receive less than two-thirds of the net remuneration of an equivalent judge who remains in it.

'Male and white'

According to solicitor Shubha Banerjee from Leigh Day: "This means that in the same court, two judges appointed on the same day to do the same work now have vastly different pensions and the judge in the better position is proportionately far more likely to be male and white."

Why so? The judges suing the government argue that it is forcing younger judges, more of whom are female and/or from a minority ethnic background, to bear the brunt of the cuts.

They say that is unfair because the older judges, far more of whom are white and male, will not see any changes to their pensions, and that amounts to indirect sex and race discrimination.

Image copyright Thinkstock Image caption Critics fear this pension change could prevent diversity among judges

If that is correct, it is bad news for a profession which has always struggled to fight off the perception that it favours white middle-class, middle-aged men.

Another irony, judges normally grant other people anonymity, don't they?

In this story, they want it themselves. One of the litigating group, who wants to remain anonymous, says: "We now have a situation where many female judges and many BME [black and minority ethnic] judges find themselves on markedly lower pay and pension terms than their often white, male colleagues in exactly the same courts despite having been appointed on exactly the same terms as others.

The new scheme brings judicial pensions into line with other public services whilst ensuring judges still receive a good pension. Ministry of Justice

"This risks harm to the future of a diverse judiciary in which women and those from non-white backgrounds can trust that they are as valued as their colleagues."

A Ministry of Justice spokesperson says there is a reason for the different treatment of judges' pensions: "Judges aged 55 and over have been given transitional protection as they have less time before retirement to make financial and lifestyle adjustments."

That doesn't wash with solicitor Shubha Banerjee who believes that judges, uniquely, can't return to their former businesses as practising lawyers.

'No negotiations'

Once given up for the bench, their commercial life has gone forever. "Judges are required permanently to dismantle their professional careers and businesses and hence have no option (even if it were allowed) to find work elsewhere, and when accepting appointment they rely entirely on the pay and pension terms agreed with them at the outset."

And that is another point that has infuriated the judges. They say that the pension changes have been imposed unilaterally.

"The reality is that there have been no true negotiations over these pension changes in an effort to solve the problem," says the one who successfully requested an "anonymity order" as a condition of contributing to this article. So, say the younger judges, we signed up to one set of pay and pension, and we're getting another, less good set.

Image copyright Thinkstock Image caption Judges are prevented from returning to commercial cases to top up their pensions

The Ministry of Justice says: "We are committed to providing an affordable, flexible, sustainable and fair judicial pension scheme.

"The new scheme brings judicial pensions into line with other public services whilst ensuring judges still receive a good pension."

And no-one is arguing that judges should be immune from cuts. The judges argue that the unfairness and discrimination can be avoided if all judges, irrespective of age, race and sex, pay a little bit more in pension contributions in order to make the savings.

A cut in judicial pensions is never going to be an issue that Joe and Josephine Public will to rush to the barricades over.

Judges remain among some of our most handsomely paid public servants. They are divided into salary groups ranging from the Lord Chief Justice at the top on £247,112 a year, to Tribunal and District judges earning between £102,564 and £106,040 a year - hardly a pittance.

What do judges earn?

Image copyright Thinkstock

Judges' salaries Role Salary 2015 Lord Chief Justice of England and Wales £247,112 Chancellor of the High Court £213,125 Recorder of Liverpool/Recorder of Manchester £142,745 Circuit Judges £132,184 Deputy Senior District Judge (Magistrates' Courts) £124,445 District Judges (Magistrates' Courts) £106,040

Full list of salaries

Those judges who make the point that they have given up far more lucrative careers as lawyers for public service as a judge will get little sympathy from Josephine and Joe.

However, the fact that judges have always been financially well looked after and treated equally has contributed to a critical part of our constitutional strength. When was the last time there was a story about a corrupt judge taking a bribe?

It happens in many countries around the world, but it just does not happen here. Many believe that we have a "straight" judiciary in part because they are given sufficient rewards to place them above temptation. Changes to the pension will not alter that, but there is a school of thought that says, some things, including generous judicial pensions, are worth paying for.

Court case for judges

Judges normally listen to arguments rather than make them, but a last word from my anonymous judge: "Unilaterally imposed changes which exempt about 80% of male judges and leave many women and BME judges on lower pay than apparently equal colleagues, are changes which it is to be hoped the Lord Chancellor will correct urgently, whilst still making the same savings across the board which the Ministry of Justice has secured."

The Lord Chancellor Michael Gove recently made a speech attacking our "two nation" justice system. He was not referring to two nations of judges divided by different pension schemes, but he may decide harmony among the younger judges demands another look at the changes.

And how about this for a final irony.

The judges have issued their claim in an employment tribunal. It will have to be heard by a judge who will be judging whether some judges, as compared with other judges, have been discriminated against. It is going to be hard to find a judge to judge that.