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.
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 currently in surplus, Royal Mail, which was privatised in 2013, claims that its current annual contribution of £400m a year would swell to £1.26bn.