A strike action planned by the nurses in England on May 2 was deemed unlawful by the High Court in London on Thursday.
The court ruling said the walkout was not covered by the current mandate, which requires the unions to hold a ballot every six months to hold strikes.
Commenting on the ruling, Royal College of Nursing (RCN) General Secretary Pat Cullen said: "Nursing staff will be angered but not crushed by today's interim order. It may even make them more determined to vote in next month's reballot for a further six months of strike action. Nobody wants strikes until Christmas - we should be in the negotiating room, not the courtroom today."
The union had to call off the strike action after the ruling but said the High Court's decision does not relate to the planned strike action on April 30 and May 1.
The RCN union members rejected a deal earlier this month, which would have given them a one-off payment of 2% of their salary, plus a COVID recovery bonus of 4% for the current financial year and 5% for the year after.
The union said it is campaigning to rectify the years of real-terms pay cuts that are pushing people out of the nursing profession and putting patient safety at risk.