Two elite US universities are suing immigration services over a decision to withdraw visas from foreign students whose courses move fully online.
Harvard and the Massachusetts Institute of Technology filed the lawsuit against Homeland Security and Immigration and Customs Enforcement (ICE).
Harvard President Lawrence Bacow said the visa move's "cruelty [is] surpassed only by its recklessness".
Many colleges are moving courses online amid the coronavirus outbreak.
Harvard had on Monday announced it would hold all classes online for the autumn term, with only 40% of undergraduates housed on campus.
The decision from ICE, the federal law enforcement agency within Homeland Security, came shortly after that, saying students could face deportation unless they changed to an institution with in-person tuition.
President Donald Trump on Tuesday lashed out at Harvard, calling its move online "ridiculous". He has been adamant that US schooling should return to normal in the autumn term.
On Twitter on Wednesday, he issued a threat to funding if schools did not reopen:
In Germany, Denmark, Norway, Sweden and many other countries, SCHOOLS ARE OPEN WITH NO PROBLEMS. The Dems think it would be bad for them politically if U.S. schools open before the November Election, but is important for the children & families. May cut off funding if not open!— Donald J. Trump (@realDonaldTrump) July 8, 2020
What's in the two universities' lawsuit?
It was filed with the district court in Boston on Wednesday morning, Harvard's student newspaper, The Harvard Crimson, reported, seeking a temporary restraining order and preliminary and permanent injunctive relief against the visa decision.
The lawsuit argues that ICE's move "threw Harvard and MIT - indeed, virtually all of higher education in the United States - into chaos".
It says ICE's action "proceeded without any indication of having considered the health of students, faculty, university staff, or communities" and leaves "hundreds of thousands of international students with no educational options within the United States".
"We believe that the ICE order is bad public policy, and we believe that it is illegal,", Mr Bacow said.
What does the visa move mean?
The Student and Exchange Visitor Programme, which is operated by ICE, had introduced a temporary exemption to allow students whose courses had moved online for the spring and summer semesters to remain in the US.
However, the exemption will not be extended into the new academic year.
The decision affects students who are in the US on F-1 and M-1 visas, according to the ICE statement.
According to the Chronicle of Higher Education, 9% of US universities are planning to teach all their classes online in the autumn, although this could change in the coming months.
Democratic Senator Elizabeth Warren described ICE's move as "senseless, cruel, and xenophobic".
But President Trump railed at Harvard, saying of its online move: "I think it's ridiculous, I think it's an easy way out and I think they ought to be ashamed of themselves."
He added: "It's so important that children at this age especially that they're together, that they're together on campus and that's what we're striving for."
Who could be affected?
Shruti Menon, BBC Reality Check
The ruling applies to specific types of visa issued for academic study. US government figures show that last year, more than 373,000 of these visas were granted.
The US had more than one million international students doing various graduate and undergraduate programmes in 2018-19, according to the Institute of International Education (IIE). That's about 5.5% of the total student community in the country.
Out of these, nearly three-quarters were from Asia - 48% Chinese and 26% Indians.
The IIE says that, according to the US Department of Commerce, international students contributed $45bn (£36bn) to the country's economy.