It’s now against the law in New York City to threaten someone with a call to immigration authorities or refer to them as an “illegal alien” when motivated by hate.

The restrictions — violations of which are punishable by fines of up to $250,000 per offense — are outlined in a 29-page directive released by City Hall’s Commission on Human Rights.

“‘Alien’ — used in many laws to refer to a ‘noncitizen’ person — is a term that may carry negative connotations and dehumanize immigrants, marking them as ‘other,'” reads one passage of the memo. “The use of certain language, including ‘illegal alien’ and ‘illegals,’ with the intent to demean, humiliate, or offend a person or persons constitutes discrimination.”

The directive goes on to list several examples of acts and comments that would run afoul of the restrictions, including harassing people over their accents or grasp of English, or wielding the threat of a call to Immigration and Customs Enforcement as a tool of hate.

“A hotel prohibits its housekeepers from speaking Spanish while cleaning because it would ‘offend’ hotel guests or make them uncomfortable,” reads one hypothetical.

“An Indian immigrant family complains to their landlord about mold and cockroaches in their unit. The landlord tells them to ‘just deal with it’ and threatens to call ICE if they file a complaint in housing court,” reads another.

“A store owner tells two friends who are speaking Thai while shopping in his store to ‘speak English’ and ‘go back to your country,’ ” reads a third.

The Commission on Human Rights made clear that the directive is, at least in part, a rebuke of federal crackdowns on illegal immigration.

“In the face of increasingly hostile national rhetoric, we will do everything in our power to make sure our treasured immigrant communities are able to live with dignity and respect, free of harassment and bias,” said Carmelyn Malalis, the agency’s commissioner.

The directive comes months after Mayor Bill de Blasio vocally opposed coordinated raids by ICE on the city’s immigrant communities.

Meanwhile on Thursday, the Mayor’s Office of Immigrant Affairs announced a joint $1 million investment with the state to guarantee legal services to immigrants facing imminent deportation.