CNN  — 

Harvard and the Massachusetts Institute of Technology on Wednesday sued the Trump administration over its guidance not allowing foreign students to take online-only courses in the US this fall semester.

Harvard announced earlier this week that all course instruction will be delivered online, including for students living on campus. In a statement provided to CNN, the university said the guidance stands to affect approximately 5,000 international students.

“The order came down without notice—its cruelty surpassed only by its recklessness. It appears that it was designed purposefully to place pressure on colleges and universities to open their on-campus classrooms for in-person instruction this fall, without regard to concerns for the health and safety of students, instructors, and others,” Harvard University President Larry Bacow said.

Visa requirements for students have always been strict and coming to the US to take online-only courses has been prohibited. Immigration and Customs Enforcement maintained that prohibition in its guidance, while providing some flexibility for hybrid models, meaning a mix of online and in-person classes.

The agency suggested that students currently enrolled in the US consider other measures, like transferring to schools with in-person instruction.

In an FAQ published by the agency, the Department of Homeland Security reasoned that “all students scheduled to study at a U.S. institution in the fall will be able to do so, though some will be required to study from abroad if their presence is not required for any in-person classes in the United States.”

The lawsuit, filed in the US District Court for the District of Massachusetts, seeks to block the directive, arguing it violates the Administrative Procedures Act. The universities argue that ICE’s decision not to provide an exemption for online-only courses puts them in an “untenable situation” of either proceeding with their plans to operate fully or largely online or attempt to provide in-person learning.

The lawsuit also underscores the challenge posed to students: “Just weeks from the start of the fall semester, these students are largely unable to transfer to universities providing on-campus instruction, notwithstanding ICE’s suggestion that they might do so to avoid removal from the country.”

It continues: “Moreover, for many students, returning to their home countries to participate in online instruction is impossible, impracticable, prohibitively expensive, and/or dangerous.”

Harvard and MIT’s lawsuit also received support from Cornell, which is joining as a friend of the court. The university said its international students will largely not be affected due to hybrid teaching, but expressed strong opposition.

“This was wholly unexpected, and it is a senseless and unfair policy that runs counter to all that we stand for as a global academic community,” said Martha E. Pollack, president of Cornell University.

There are more than 1 million international students in the US.