Proponents say this type of urban design is necessary to help maintain order, ensure safety and curb unwanted behavior such as loitering, sleeping or skateboarding.

But hostile architecture, in New York and other cities, has increasingly drawn a backlash from critics who say that such measures are unnecessary and disproportionately target vulnerable populations. They have assailed what they call “anti-homeless spikes” for targeting those who have nowhere else to go at a time when many cities are grappling with a homelessness crisis.

In New York, about 79,000 people are homeless, of which about 5 percent are believed to live on the street, according to federal estimates.