In a New York courtroom on Saturday evening, the judge said that sending the travelers home could cause them “irreparable harm.”