New York City would resist if Donald Trump follows through on his promises to crack down on illegal immigration, restrict abortion and expand the police practice of stop-and-frisk, Mayor Bill de Blasio said Thursday.

“We’re not going to take anything lying down. I think that’s the central point,” said de Blasio, a Democrat. “Anything we see as a threat to New Yorkers we’re going to confront.”

Seated at City Hall beneath a portrait of Alexander Hamilton, de Blasio said his staff has reached out to Trump’s staff to schedule a telephone call between the two.

De Blasio said he hoped to cooperate with Trump on infrastructure rebuilding and ending some trade deals.

But he disagrees with Trump on numerous issues.

De Blasio in 2014 signed a law barring local authorities from jailing an arrestee based solely on the federal government’s claim that the person is in the country illegally.

advertisement | advertise on newsday

Trump has condemned cities such as New York that refuse to cooperate with federal immigration officials.

In July, Trump called de Blasio, who is a Hillary Clinton supporter, “the single worst mayor in the history of New York City.”

De Blasio at a news conference called it “speculative to assume how he’s going to proceed.” But he said Trump’s past calls to deport undocumented immigrants and stop Muslims from traveling to the United States “very dangerous.”

“We are not going to sacrifice a half million people who live amongst us, who are part of our community,” de Blasio said.

De Blasio promised that he would “absolutely” keep confidential the names of the city’s IDNYC cardholders — a city program that offers New York City identification cards regardless of immigration status.

Under the 2014 law establishing the ID program, the entire database is set to be wiped out by Dec. 31 unless the mayor moves to retain the records. The cards will still be valid.

Councilman Carlos Menchaca (D-Brooklyn) said in 2015 that the provision was drawn up, “in case a Tea Party Republican comes into office and says, ‘We want all of the data from all of the municipal ID programs in the country.’”

More than 900,000 people have signed up for the IDs.