A band of San Francisco residents have taken matters into their own hands when it comes to the city’s growing homeless crisis — setting up boulders on their street to deter vagrants from setting up a shantytown.

Residents of the Mission Dolores neighborhood recently chipped in to buy the roughly two dozen stones that now line the edge of a stretch of sidewalk along Clinton Park, Fox affiliate KTVU reported.

The block near Market and Dolores streets has become a haven for the homeless, who neighbors say shoot themselves up with drugs and then pass out.

“Since the rocks, it has helped,” neighbor Ernesto Jerez told the news outlet, adding, “It’s something. We’ve got to do something. I feel like there is nothing being done.”

Another neighbor, David Smith-Tan, said that his family received a letter from area residents about a month ago in relation to the homeless issue on the sidewalk.

He said the vagrants that frequent the area “shoot up and stay overnight.”

“A bunch of my neighbors, we all chipped in a few hundred dollars and I guess this is what they came up with,” Smith-Tan told KTVU in reference to the large rocks that are meant to act as a barrier to keep out homeless encampments.

The boulders may have helped with the problem on the block, but one homeless advocate alluded that the solution was a cruel one.

“There’s actually a name for it. It’s called anti-homeless architecture,” Jennifer Friedenbach, the executive director of the Coalition on Homelessness, told KTVU.

“We have 1,200 people on the waitlist for shelter. That’s for tonight. People have nowhere to go,” Friedenbach said.

A spokeswoman for the San Francisco Public Works department said the city had no part in putting the boulders on the block but told the site that it has no plans to remove them since they are not blocking the sidewalk.

Meanwhile, New York City Department of Social Services spokesman Isaac McGinn weighed in on the boulder method, calling it a “punitive tactic.”

“We believe the best way to help those in need is offering supportive services through compassionate engagement,” McGinn said in a statement, adding that the city’s HOME-STAT program has helped more than 2,200 people off the streets. “We’re focused on taking that progress further, not undermining it with punitive tactics like these.”

It’s not the first time that boulders have been used around the city of San Francisco to discourage encampments from forming.

Two years ago, the California Department of Transportation put rocks in an open space off Bayshore Boulevard to deter encampments, the news outlet reported.

San Francisco saw a 17% increase in its homeless population over the last two years, according to city figures released this year.

President Trump said last week that the US Environmental Protection Agency will issue a “notice” to San Francisco over environmental issues caused by the city’s homeless population.

Additional reporting by Julia Marsh