Calling the policy cruel and illegal, Attorney General Maura Healey is preparing a lawsuit to stop federal regulations that would force international college students to leave the country unless they take courses in-person.

One day after the Immigration and Customs Enforcement agency suddenly unveiled the new Student and Exchange Visitor Program policy, Healey announced that she would launch a case aimed at stopping its enforcement. "Not on my watch," Healey tweeted, calling the policy another Trump administration attempt to "stir up uncertainty & punish immigrants."

Under the policy, which was announced Monday, international students in Massachusetts would not be permitted to remain in the United States if their college or university embraced an all-online class model for the fall semester.

"As our colleges and universities navigate this unprecedented pandemic and grapple with how to continue teaching students, the Trump Administration has found ways to create more uncertainty and disruption," Healey said in a statement. "Massachusetts is home to thousands of international students who should not fear deportation or be forced to put their health and safety at risk in order to advance their education. This decision from ICE is cruel, it's illegal, and we will sue to stop it."

Healey's office is preparing the lawsuit and working with the state's major colleges and universities -- including Harvard University, which plans to offer all courses online for the fall -- to support students.

ICE's proposal drew quick condemnation from UMass President Marty Meehan and from the American Federation of Teachers's Massachusetts chapter.