Chelsea residents say New York’s bad old days are back with a vengeance on West 25th Street in the heart of the tony neighborhood, where mentally ill derelicts living in a new homeless shelter are masturbating and defecating in the street and aggressively harassing women — just as locals predicted when the city approved the place.

“You leave at night, you’re alone, and these people are walking up and down. [They] are intimidating,’’ said Carmela Wiegman, 79, an owner of Westphal Cutlery-Tools at 115 W. 25th, who added that shelter residents have come into her shop to see if it sells crack pipes and knives.

“They walk like they’re stoned. They look like zombies,” she said.

An elderly neighbor said he was walking his dog when three men strolled past him and threw garbage.

“Hey, pick that up, this is a neighborhood, and we are trying to keep this street clean,” he said he told them.

“F–k you, go to hell!” they replied, the man said.

The Bowery Residents Committee opened the men’s homeless facility — the Jack Ryan Center shelter — at 127 W. 25th St. in late summer, and the trouble started almost immediately, said neighbors, who’ve filed a lawsuit to shut it down.

The shelter is now at only about one-third of its capacity, with 115 residents.

Another neighbor, Maggie Gallagher-Lilly, said that she and her husband now avoid walking on West 25th between Sixth and Seventh avenues after encountering as many as 30 shelter residents at a time loitering and blocking the sidewalk.

She said shelter residents have been caught masturbating and defecating in plain view on the street.

The residents said Muzzy Rosenblatt — who makes about $280,000 a year as the nonprofit BRC’s executive director — has done little to address their concerns.

Rosenblatt wouldn’t respond to questions, but e-mailed a brief statement: “BRC and many of our neighbors do not share this characterization. BRC is in close communication with our neighbors, and has and will continue to respond to the thoughtful concerns they raise.”