It is a major blow for Theresa May’s weak and unstable government and further evidence of how the Tories treat their own workforce and other public servants with contempt.

We successfully took a judicial review after being excluded from negotiations over changes to the civil service compensation scheme – which governs voluntary and compulsory redundancy terms.

Civil servants made redundant in the last eight months could now have a claim for compensation after being left thousands of pounds worse off.

In court we argued the former Cabinet Office minister Ben Gummer – who lost his seat at the general election – failed in his legal “duty to consult with a view to reaching agreement” by excluding us from more than a dozen meetings attended by most of the smaller unions.

After initial talks on proposals for new, worsened terms in early 2016 a senior Cabinet Office official wrote to the unions in June of that year to propose a further round, but stated:

“I want to be clear that attendance at any further discussions will be taken as a clear commitment that those unions engaging in the talks have accepted that the proposal above will form the basis of a reformed, negotiated, set of arrangements that their relevant executives can recommend acceptance to their members in any ballot.”

Along with the Prison Officers’ Association and Unite we refused to agree to this, so were excluded. All the other civil service unions agreed to take part on that basis. The judges conclude it was “not surprising [the three unions] were unable to give such a commitment”.

In the judgement handed down today, Lord Justice Sales and Mrs Justice Whipple add: “There was no basis on which the Minister was entitled to exclude the PCSU from the consultation.”

On the Cabinet Office’s claim that inclusion would have made no difference, the judgement states:

“It cannot be said that it is highly likely that the outcome would not have been affected if the PCSU had been allowed to participate in the second round of discussions, as it should have been.”

“The safeguard for workers is that they will not have their rights to compensation benefits diminished or removed without a genuine attempt first having been made to secure agreement on that specific issue with their union representatives. These provisions are not concerned only with vague agreements in principle.”

Our general secretary Mark Serwotka said: “This is yet another example of how Tory governments treat their own workforce and other public servants with utter contempt. Ministers must have known they were breaking the law by excluding us, yet they went ahead anyway.

“There is no way we would ever allow ourselves be chained in negotiations where the terms are rigged and the outcome fixed in advance, and no right thinking person could expect us to.

“In trying to write us out of the script the government only succeeded in revealing how weak and vulnerable the Tories really are, and how their divide and rule tactics are just a recipe for instability.

“This judgement is a major victory for us and all civil servants and shows the value of belonging to a trade union that is prepared to fight back.”