Royal Mail has won an injunction in London’s High Court preventing next week’s 48-hour strike.
The postal firm’s workers had been set to walk out from 19 October in protest over pensions, wages and jobs.
But the company said the strike would be “unlawful” if the Communication Workers Union (CWU) did not follow dispute resolution procedures.
A strike ballot of the CWU’s 110,000 members had produced an 89.1% vote in favour on a 73.7% turnout.
It would have been the first national strike since Royal Mail was privatised four years ago.
The CWU said it was “extremely disappointed” at the ruling and described it as “a desperate delaying tactic from a board who are increasingly out of touch with the views of its workforce”.
Mr Justice Supperstone, who granted the injunction, said: “I consider the strike call to be unlawful and the defendant is obliged to withdraw its strike call until the external mediation process has been exhausted.”
The CWU has said that Royal Mail’s move to reform workers’ pensions means that its members will lose up to a third of their retirement entitlements.
The company said pension scheme members would indeed build up smaller benefits in future, but that was because the plan in its current form was unaffordable.
Earlier this year, the Royal Mail announced that it would close its current defined benefit scheme in March 2018.
Although the pension fund is in surplus, Royal Mail, which was privatised in 2013, claims that its current annual contribution of £400m a year would swell to £1.26bn.
The company also said it was one of the few firms offering to replace one defined-benefit scheme with another.
CWU general secretary Dave Ward said: “The company are deluded if they believe their courtroom politics will resolve this dispute. Instead, the company’s actions will have the complete opposite effect.
“Postal workers’ attitude towards the company will harden and it makes us more determined than ever to defend our members’ pensions, jobs, service and achieve our objectives.”
Shares in Royal Mail closed 0.7% higher at 388.3p.