BOSTON (CN) — Seventeen states and the District of Columbia brought a massive federal complaint Monday over the Trump administration’s new rule requiring foreign students to take classes in person, not just online, to stay in the country during the coronavirus pandemic.

“The Trump administration didn’t even attempt to explain the basis for this senseless rule, which forces schools to choose between keeping their international students enrolled and protecting the health and safety of their campuses,” said Massachusetts Attorney General Maura Healey, who leads the lawsuit filed in Boston from a coalition of states.

Rather than join Healey’s suit, New York state filed its own complaint Monday in Manhattan federal court.

The suits come a week after Harvard University and the Massachusetts Institute of Technology brought similar claims. A federal judge in Boston is expected to rule on the schools’ bid for a preliminary injunction Wednesday.

There are about 1 million foreign students in the U.S., and the order could cause large numbers of them to leave, Boston immigration attorney Brian O’Neill said in an interview.

This would create “a huge economic loss” in university towns because foreign students lease apartments, buy cars, and do a lot of shopping, added Micol Mion, another Boston immigration attorney.

Universities also face heavy economic losses because foreign students typically pay full tuition, and many might decide to quit if they can’t stay in the U.S. for the cultural experience, the lawyers both said.

Healey emphasized that there are 77,000 foreign students who add more than $3.2 billion to the state economy each year enrolled in Massachusetts’ 121 colleges and universities.

Before the Immigration and Customs Enforcement agency altered the policy on July 6, foreign students could stay in the U.S. and take online-only classes in the spring and summer semesters as an emergency response to the pandemic.

Now, however, “the U.S. Department of State will not issue visas to students enrolled in schools and/or programs that are fully online for the fall semester nor will U.S. Customs and Border Protection permit these students to enter the United States,” the order states.

“Students currently in the United States enrolled in such programs must depart the country or take other measures, such as transferring to a school with in-person instruction.” Otherwise, “they may face immigration consequences including, but not limited to, the initiation of removal proceedings.”

According to Healey, “the federal government’s actions are arbitrary, capricious, and an abuse of discretion because they reverse previous guidance without explanation, input, or rationale — in violation of the Administrative Procedure Act — and fail to consider the need to protect public health and safety amidst the ongoing Covid-19 pandemic.”

The New York lawsuit makes similar claims. It notes that the state has about 100,000 foreign students, or 10% of all college and university students in the state.

After filing the lawsuit this morning, Healey held a rally on the steps of the Massachusetts State House featuring students and university employees.

“We were shocked at the Department of Homeland Security’s ill-considered guidelines on the enrollment of international students for the fall,” Robert Brown, president of Boston University, said. “The DHS ruling will be severely detrimental to the education of thousands of international students and will cause long-term damage to the world’s view of our country.”

Fueling the panic for colleges and universities is a July 15 deadline for them to notify ICE if they plan to offer only online courses. Schools that will offer at least some in-person classes must provide ICE with “operational plans” for doing so by August 1.

Vincent Pedone, executive director of the Massachusetts State Universities Council of Presidents, called ICE’s order “nothing more than an attempt to force schools to open regardless of safety and it is plain wrong.”

The lawsuit brought by Harvard and MIT was filed on July 8. A hearing will be held Tuesday, and the judge in the case has promised a ruling by the next day — July 15 — so that the universities will have some clarity as to how to proceed regarding the ICE deadlines.

Supporting the schools’ lawsuit are 326 colleges and universities, 26 cities and towns, 18 business organizations, 16 educational and professional societies, 16 student government organizations, and four unions including the American Federation of Teachers.