BOSTON (AP/KDKA) — The Trump administration has rescinded a rule that would have required international students to transfer schools or leave the country if their colleges hold classes entirely online this fall because of the coronavirus pandemic.

U.S. Immigration and Customs Enforcement announced the decision as a court hearing was getting underway on a challenge to the rule by Harvard University and the Massachusetts Institute of Technology.

READ MORE: SWAT, Pittsburgh Police Called To South Side Home For Man Throwing Objects Out Of His Window

A federal judge scheduled arguments Tuesday in the lawsuit brought by Harvard University and the Massachusetts Institute of Technology, which argued that the policy was created unlawfully and that it contradicts previous guidance from federal immigration officials. The colleges were asking the court to block the rule at least temporarily.

“We are pleased that, in the face of tremendous opposition from the academic and business communities, and many States, ICE committed today to withdraw its proposed new guidelines and revert to the guidelines which have been in place since early in the pandemic.   As always, our students, who worked tirelessly with other students across the nation on an amicus brief which personalized the cruelty of the new guidelines, were a particular source of inspiration.   While we are cautiously optimistic about today’s decision, we will remain vigilant as we advocate for all members of our community and continue to safeguard Carnegie Mellon’s mission as a vital engine for creativity, innovation and opportunity,” Carnegie Mellon University President Farnam Jahanian said in a statement provided to KDKA.

Pennsylvania, the City of Pittsburgh, the University of Pittsburgh and CMU backed Harvard University and MIT’s lawsuit.

Under the policy, international students in the U.S. would be forbidden from taking all of their courses online this fall. New visas would not be issued to students at schools planning to provide all classes online, which includes Harvard. Students already in the U.S. would face deportation if they didn’t transfer schools or leave the country voluntarily.

The rule created a dilemma for thousands of foreign students who stayed in the U.S. after their colleges shifted to remote learning last spring.

As part of the policy, U.S. Immigration and Customs Enforcement told colleges to notify the agency no later than Wednesday if they plan to hold all classes online this fall. Other colleges would have until Aug. 1 to share their fall plans with ICE.

Pittsburgh Mayor Bill Peduto released a statement, saying:

“Earlier today, at the start of a hearing for a corresponding federal lawsuit brought by Harvard University and the Massachusetts Institute of Technology, the Trump Administration rescinded federal policies announced last week that would have suspended international visas under the Student Exchange and Visitor Program. The City of Pittsburgh is proud to have joined 25 other municipalities nationwide that signed on to an amicus brief in support of the Harvard-MIT suit. The ICE policy announced last week would have jeopardized the safety and well-being of our international students and caused unnecessary panic and trauma during an unprecedented global pandemic.

“Pittsburgh’s international students are woven into the fabric of our institutions of higher learning, regional economy, and neighborhoods. We are relieved that this decision preserves the ability of these essential members of our community to prioritize their health and safety and remain in their new home. As we face difficult decisions around reopening, whether it be within our institutions of higher learning or elsewhere, my administration remains committed to the belief that these decisions must be firmly rooted in an effective public health approach. The policies that were rescinded today represented a continuation of harmful efforts by the Trump Administration to chip away at duration of status. These efforts are not only economically misguided but morally wrong. Immigrants have shaped the history of Pittsburgh and continue to shape our city for the better. I remain firmly committed to standing with our immigrant and refugee communities in building a Pittsburgh for All.”

MORE NEWS: Police Investigating Reported Stabbing In Arlington

(TM and © Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)