Boulders erected by neighbors who clubbed together in an attempt to deter the homeless from camping out in the area have been removed by authorities.

Two dozen of the small boulders which lined Clinton Park Alley in the city were removed on Monday.

The small rocks had been placed there by residents who had raised money for the initiative via a GoFundMe page, to prevent the homeless or drug users from loitering or setting up tents in the area.

A homeless charity condemned the action, calling the rocks 'anti-homeless architecture.'

Boulders erected by neighbors who clubbed together in an attempt to deter the homeless from camping out in the area have been removed by authorities

Two dozen of the small boulders which lined Clinton Park Alley in the city were removed on Monday

The small rocks had been placed there by residents who had raised money for the initiative via a GoFundMe page, to prevent the homeless or drug users from loitering or setting up tents in the area

The determined locals agreed it was in the interests of the community to try to prevent drug users from camping out there at night time.

San Francisco's Public Works, financed by the government, removed the boulders. The director, Mohammed Nuru, said the boulders were removed because of their size.

According to local media, other residents who believed the rocks were an attack on homeless people began pushing them off the sidewalk and onto the road in protest.

The director, Mohammed Nuru, said the boulders were removed because of their size

The determined locals agreed it was in the interests of the community to try to prevent drug users from camping out there at night time

'I actually agree that the boulders temporary worked. But the problem is that they were not big enough and were able to be pushed out to the street,' Nuru told ABC 7.

While praising the locals for their initiative, he added that a more permanent solution could be 'bigger boulders' or a landscape plan.

A charity for homeless people, 'Coalition on Homelessness', referred to the boulders as 'hostile' and 'anti-homeless architecture'.

In a tweet on Sunday, the charity said the issue was not the 'rocks' and called on the City to provide homeless people with sufficient housing or shelter.

The determined locals agreed it was in the interests of the community to try to prevent drug users or the homeless from camping out there at night time

According to local media, other residents who believed the rocks were an attack on homeless people began pushing them off the sidewalk and onto the road in protest

A charity for homeless people, 'Coalition on Homelessness', referred to the boulders as 'hostile' and 'anti-homeless architecture'

'The issue is not the rocks.

'The issue is that the City 1) Does not provide sufficient housing, healthcare or even shelter for homeless folks AND THEN AT THE SAME TIME 2) Makes it impossible for them to exist in public space through 26+ laws, hostile architecture, police etc.'

San Francisco has long struggled with problems of human waste and needles on the streets in the Tenderloin district, where many addicts and homeless people are found.

The city set up public toilets and last year announced formation of a special six-person 'poop patrol' team to clean up the human waste.

San Francisco also announced funding to hire people to pick up used needles.

President Donald Trump recently threatened to unleash the Environmental Protection Agency on the city after a California visit during which he blamed the homelessness crisis on 'liberal' policies.

Trump accused the city of allowing a tremendous amount of waste, including needles, to go through storm drains into the ocean.

'It's a terrible situation that's in Los Angeles and in San Francisco,' he told reporters on Air Force One as he returned to Washington.

'And we're going to be giving San Francisco — they're in total violation — we're going to be giving them a notice very soon. They have to clean it up. We can't have our cities going to hell,' he said.

In a statement, Mayor London Breed called Trump's remarks 'ridiculous' and said storm drain debris is filtered out at city wastewater treatment plants so that none flows 'into the bay or ocean'.