LOS ANGELES (CBSLA/AP) — The Trump administration rescinded a rule Tuesday that would have required international students to transfer or leave the country if their schools held classes entirely online because of the pandemic.

The decision was announced at the start of a hearing in a federal lawsuit in Boston. U.S. District Judge Allison Burroughs said federal immigration authorities agreed to pull the July 6 directive and “return to the status quo.”

READ MORE: Single-Engine Plane Catches Fire After Crash Near Big Bear City Airport

A lawyer representing the Department of Homeland Security and U.S. Immigration and Customs Enforcement said only that the judge’s characterization was correct.

The government was facing several lawsuits over the directive. Tuesday’s hearing, in a lawsuit filed by Harvard and MIT, would have been the first. But lawsuits had also been filed by a coalition of schools that included USC, Pitzer, Scripps, and Pomona colleges; Caltech in Pasadena, Chapman University in Orange, Claremont McKenna College and the University of San Diego; seven international students in Orange and Los Angeles counties; and the state of California.

READ MORE: Several Cows Escape From Meatpacking Plant In Pico Rivera, 1 Killed By Deputies; At Least 1 Person Injured

“The Trump Administration appears to have seen the harm of its July 6 directive, but it shouldn’t take lawsuits and widespread outcry for them to do their job,” state Attorney General Xavier Becerra said in a statement. “In the midst of an economic and public health crisis, we don’t need the federal government alarming Americans or wasting everyone’s time and resources with dangerous policy decisions.”

Schools and universities across the nation made a historic shift to online classes in March to slow the spread of coronavirus. Resurging spikes of COVID-19 infections across the country have forced most university and many school districts to continue remote learning when classes start up for the 2020-21 school year.

Before the rule was announced, international students were protected by guidance issued by the student visitor program, which kept non-immigrant student visas in compliance regardless of how their college managed the shift from in-person classes.

MORE NEWS: Huge Waves, High Tides Raises Fears Of Coastal Flooding In Newport Beach

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)