NYPD will not cooperate with President Donald Trump’s new deportation orders, New York City Police Commissioner James O’Neill has said.

A spokesperson for the NYPD said the police commissioner was  reiterating NYPD policy that has been in effect since Mayor de Blasio took office, CBS reports. He added that while federal warrants are honored when there is a risk to public safety, last year the NYPD turned over only two of 72 illegal immigrants sought by the feds.

“The NYPD does not conduct civil immigration enforcement. Specifically, this department does not enforce administrative warrants issued by Immigration and Customs Enforcement agents or federal immigration judges, solely in connection with civil immigration violations. For example, the NYPD does not arrest or detain individuals for immigration violations such as overstaying a lawfully issued visa,” O’Neill stated in an internal memo sent to the NYPD earlier this week.

On Friday, a top NYPD official told reporters that minor offenders will not be handed over to immigration officials.

“Even if you're a recidivist and jumped a turnstile for the fourth or tenth time, and we arrest you for the misdemeanor crime, that’s a misdemeanor — it’s not a qualifying offense for deportation efforts,” said NYPD Deputy Commissioner for Legal Affairs Larry Byrne. “Nobody is getting deported for a minor offense.

Byrne, a formal federal prosecutor, said police do not cooperate with deportation efforts unless two conditions are met: the existence of a "federal judicial arrest warrant," and the person who is the subject of that warrant committed within the last five years at least one of 170 crimes the city deems serious.

He said those who commit minor offenses and have no outstanding warrants are given summonses and are not fingerprinted. He added that this protects residents from having their information entered into computer systems which federal officials can then use in order to find undocumented residents.

“Nobody is getting deported for jumping a turnstile,” Byrne said. “Our policy is, if you jump a turnstile, unless you are a transit recidivist, you don’t even get a criminal summons. You get a civil summons … where you are not fingerprinted and that does not go into any criminal system.”

A spokesperson for Mayor Bill de Blasio said the city’s stance on deportation will not change despite the president’s new guidelines.

“The mayor and the NYPD won’t be changing positions,” Press Secretary Eric Phillips said.

Some experts dispute the NYPD stand. Security expert Manny Gomez, a former police officer and FBI agent said: “It’s not fair to the cops and it’s a threat to public safety. The police department’s policy should be clear cut and simple. You commit a crime, you get found out to be illegal, you get handed over to the federal authorities.”

He added that the city’s defiance could come at a cost.

“The city of New York does not want to go head-to-head with the White House. That’s a losing battle,” he said.

New York gets more than $7 billion from Washington, and Trump could retaliate by not only cutting funding for the NYPD but also for housing and transpiration grants, said Gomez.

There are also limits on the protections the city can offer to residents, Politico reports.

Byrne told reporters: “ICE and other federal agencies have authority to enforce those warrants completely independent of the NYPD and they don’t have to consult with us before they do that. They do that all the time. … There’s nothing new about that practice.”