Three train operating companies were granted an injunction against the Rail, Maritime and Transport Union. The judge, Mr Justice Turner, will give his reasons on Monday.
He gave the RMT permission to appeal against his decision to grant an injunction to Virgin, South West Trains, and Connex South Central. The union is objecting to rule changes, approved by the health and safety executive. The union says that the rules diminish the responsibility of guards by putting drivers in sole charge of trains.
The companies had accused the RMT of turning its back on new safety rules by calling a strike over the revised status of guards.
Their counsel, Andrew Clarke QC, told the judge that the union clearly believed that the new rule book covering the responsibility of guards, contained new safety enhancements. Yet it wanted Railtrack to go back to the old rules, at least until the end of the Cullen inquiry into the Paddington train crash.
The companies said that because they were not responsible for the rule changes introduced by Railtrack, the industrial action was unlawful. It was not a dispute with the companies.
John Bowers QC, for the RMT, said that it saw the erosion and "deskilling" of the guards' role as the "thin end of the wedge" and suspected there was a hidden agenda behind it.
Words such as "historical outdated practices" which had been used by the employers were enough to "send a shiver down the spines of the guards".
The RMT feared that the operators would eventually employ people like students as guards on the grounds that the role was outmoded.
So long as the union acted in the honest belief that it had good cause for its action, it was not for the court to inquire into the rights and wrongs of the strike call.
Guards at 19 of the 25 train companies have voted for the strike, with those at four voting against. Out of 6,000 guards, 2,000 voted, of whom 84% were in favour.
Two companies, Thameslink and West Anglia Great Northern, are not involved.
Mr Clarke told the judge that the RMT's general secretary, Jimmy Knapp, had made it clear that nothing short of a complete withdrawal of the rules would be acceptable. Railtrack had introduced the new rules after consultation with the train operators, the rail unions and the railways inspectorate.