Elected officials jumped in front of protests this week to say they will do whatever it takes to protect immigrants from the Trumpaggedon.

However, when Mayor Bill de Blasio plays up the rhetoric that New York is a so-called sanctuary city, the record should scratch to a halt because that’s not necessarily true under broken-windows policing.

Broken windows, the enforcement of low-level, quality-of-life infractions, continues in NYC and puts some of the city’s most vulnerable populations — including immigrants here illegally — at risk. These include offenses like fare-beating, for which there were almost 30,000 arrests in 2015, as well as unsanctioned vending in the street and subway, which is often done by immigrants.

If NYC is such a sanctuary, why does a substantial portion of the immigrant community in my neighborhood of Spanish Harlem fear or dislike the police?

Not only has broken windows sowed distrust among some, it doesn’t make us any safer. A city report last year undermined any correlation between broken windows and serious crime. For immigrants here illegally, the stakes are high. Arrests, including low-level ones, produce fingerprints that are sent to federal authorities. While summonses don’t, multiple arrests for some offenses could make legal permanent residents deportable.

And that’s not the only problem for supporters of this supposed sanctuary city. The IDNYC municipal identification card also has led to questions about whether President Donald Trump’s deportation machine could use the program’s data. Regardless of two pending lawsuits that seek to prevent the city from destroying the data, the city may have created a de facto immigrant registry with IDNYC. If and how Trump tries to use it is anyone’s guess.

Already, civil rights attorneys and public defenders have asked city prosecutors for a moratorium on low-level prosecutions. This follows a letter from legal organizations to City Council Speaker Melissa Mark-Viverito, detailing the risks broken-windows practices impose on immigrants.

Immigrants and their supporters should look closely at City Hall. You may find the mayor and council are a much bigger piece of the problem than they’d have you believe.

Josmar Trujillo is a trainer, writer and activist with the Coalition to End Broken Windows.