More than $7 billion in federal aid to New York City would be at risk if President-elect Donald Trump makes good on his proposal to cut funding to so-called sanctuary cities, according to an analysis from the city comptroller’s office.

The preliminary figure accounts for all federal funding to the city, but even a partial cut would be harmful, Comptroller Scott Stringer said after releasing the analysis Wednesday.

Federal funds make up nearly one of every 10 operational dollars spent by the city and are directed mostly to agencies that serve vulnerable populations, including the Department for Homeless Services and the Administration for Children’s Services, the Democratic comptroller said.

“I urge President-elect Trump to remember that behind every federal line item is a human face — a family in need, a victim of domestic violence, an AIDS patient, a hungry schoolchild,” Stringer said in a statement.

Federal funding to the NYPD’s counterterrorism efforts could also be cut, Stringer said.

Trump has vowed to “end sanctuary cities” as part of his immigration platform and frequently spoke about limiting federal dollars to them during his campaign. The Manhattan real estate mogul campaigned against “criminal aliens” while voicing steady support for police officers and anti-terrorism efforts.

advertisement | advertise on newsday

Representatives of his transition team did not respond Wednesday to a request for comment on Stringer’s report.

New York City is among dozens of urban centers nationwide whose leaders have pledged to shield undocumented immigrants from deportation by refusing to fully comply with the orders of federal immigration officials. Mayor Bill de Blasio, in a speech Monday, reaffirmed that city officials would use “all the tools at our disposal” to protect residents, including those who arrived illegally.

Asked whether Stringer still supports the city’s sanctuary status despite the threat of lost funding, he said in a statement, “We all need to stand up together for our values as a city — we are a city that welcomes immigrants and that doesn’t change. But as this report shows, we need a strategy at all levels — federal, state, and local — to protect against any cuts in federal aid.”