Harvard University and Massachusetts Institute of Technology on Wednesday asked a federal court to block the Donald Trump administration’s order to not allow holders of student visas to remain in the United States if their universities switched to online-only classes for the fall due to the coronavirus pandemic, The Harvard Crimson reported.

The lawsuit, seeking a temporary restraining order, was filed at the District Court in Boston.

“The order came down without notice – its cruelty surpassed only by its recklessness,” Harvard President Lawrence Bacow said in an email to affiliates. “We believe that the ICE [Immigration and Customs Enforcement] order is bad public policy, and we believe that it is illegal.”

Bacow added that the case will be pursued vigorously so that all international students at institutions across the country can continue their studies without the threat of deportation.

Massachusetts Attorney General Maura Healey on Tuesday said that her office will “sue” the administration over the order, adding that it is “cruel” and “illegal”.

The move by Harvard and MIT, two of the most elite American universities, came two days after US Immigration and Customs Enforcement issued an order that could force tens of thousands of foreign students to leave the country if their universities switch to online classes. Those students must transfer or leave the country, or they potentially face deportation proceedings, according to the order.

The new changes applies to holders of F-1 and M-1 visas, which are for academic and vocational students.

The government agency had said institutions moving entirely to online learning must submit plans to them by July 15. Schools that will use only in-person learning, shortened or delayed classes, or a blend of in-person and online learning were asked to submit plans by August 1.

On Monday, Harvard had announced it would conduct all classes online in the 2020-’21 academic year. Foreign students are a key source of revenue for many of the American universities as they often pay full tuition.