Attorneys general from 18 states, including Pennsylvania and New Jersey, on Monday sued the Trump administration in a bid to block a new U.S. Immigration and Customs Enforcement directive that would require international students to take most or all fall 2020 classes in person or face deportation.

Their federal complaint, filed in Massachusetts, argues the directive is a threat to public health, and puts students and faculty at risk by pressuring universities to increase in-person learning amid a pandemic with rising case numbers and death tolls. The lawsuit follows a slew of cases brought forth by Harvard College, Massachusetts Institute of Technology, Johns Hopkins University, and the State of California, that contend the policy change threw all of higher education across the country “into chaos.”

“This ICE directive puts the lives of all of our students at risk by using international students and the tuition they pay as leverage to force colleges and universities to start in-person classes before they are ready,” New Jersey Attorney General Gubir S. Grewal said in a statement. “It is reckless, irresponsible, immoral, and illegal.”

The suit stems from a July 6 ICE directive that rescinded one issued after the COVID-19 pandemic hit in March that allowed international students with F-1and M-1 visas to stay in the United States while taking online coursework “for the duration of the emergency.”

Pennsylvania’s attorney general, Josh Shapiro, said he joined the coalition challenging the new order in response to concern from affected schools across the commonwealth, including the University of Pennsylvania, Carnegie Mellon University, and the University of Pittsburgh. Condemning the directive for its politicizing and partisan agenda, Shapiro singled out Trump’s secretary of education and pledged that students in his state will be able to continue their education here.

“Betsy DeVos’ attempt to take advantage of an international pandemic — to push a cynical, partisan agenda that threatens the health and safety of young people who want to pursue an education — is cruel, illegal, and puts our already fragile economy at risk,” Shapiro said in a statement.

The lawsuit also contends that ICE failed to provide adequate reasoning for its decision, or a reasonable timeline, deeming the directive arbitrary and in violation of the Administrative Procedure Act’s two-week notice-and-comment rule-making requirement.

An ICE spokesperson did not respond to phone and emailed requests for comment on Monday.

Beyond giving no notice before announcing the directive, ICE imposed a deadline of July 15 for universities to advise the federal government whether their coursework will be taught online, and a deadline of Aug. 4 to confirm that each of their international students will be taking coursework in person or a hybrid of in-person and online. The lawsuit said this decision showed little regard for students, faculty, and administration who are out of the country, students who are not yet registered for classes, and faculty who have not yet decided their method of instruction due to the fast-changing nature of the pandemic.

“Not only is ICE’s new directive a disservice to international students who are pursuing higher education in the middle of a global pandemic, but by providing less than two weeks’ notice, ICE is carelessly pressuring institutions to make critical decisions about instruction for the fall 2020 semester,” Diana Gonzalez, New Jersey’s interim secretary of higher education, said in a statement.

The decision has sent international students scrambling to register for in-person classes, as many universities nationwide continue to grapple with how and when to resume their operations for the fall semester.

Rutgers University, with an international student population of about 6,000 students, announced July 6 before ICE’s directive that it would eliminate almost all in-person classes to limit the spread of the virus.

“Presenting these new policy proposals in the midst of the global pandemic, on the heels of announcements that New Jersey’s universities will be providing remote instruction, and only weeks before the start of the next semester is both revealing and troubling,” Rutgers University president Jonathan Holloway said in a statement. “We applaud and support the attorney general’s efforts today to stop the imposition of the proposed directive, which, on its face, seem to be motivated by politics during the pandemic. The directive is thoughtless and in direct conflict with the values we hold dear.”