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: Man And Woman Shot To Death In Gardena

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: Local Doctors Flying Back From Super Bowl Save Woman's Life On Plane

“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: Rally Held Outside LA Hall Of Justice To Recall District Attorney George Gascón

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