For the third time in just over a week, public works crews hoisted large rocks back onto the sidewalk of a San Francisco alley Saturday — the latest twist in an escalating, days-long dispute weighing the morality of using rocks to impede drug dealers and homeless people from being on the sidewalk.

Neighbors on Clinton Park, a two-block alley between Dolores and Valencia streets, told The Chronicle that a group of residents raised money to buy the boulders and line them up along the edge of the sidewalk in an attempt to dissuade open-drug dealing and people camping out.

Twenty-four heavy boulders — each about 2 to 3 feet high and 3 to 4 feet wide — dot the sidewalk. City officials say they are not responsible for the rocks that mysteriously appeared roughly two weeks ago, and that the anonymous people who placed the rocks followed city codes and left a 4-foot walkway so as not to obstruct pedestrians.

While some residents, such as Charles Rubinoff, a renter who has lived in the neighborhood for two years, said the rocks are not a solution to the Bay Area’s homeless crisis, other residents say that the rocks are not an anti-homeless effort at all — but instead a strategy to thwart violent drug dealers from setting up shop on the sidewalk.

A man named Hugh — who like many on the street wanted to be identified only by his first name for fear of retaliation — said that in the six years he’s lived in the neighborhood, he has seen people dealing methamphetamine there. Other times, he said, he’s witnessed drug dealers carrying knives.

Hugh said he could empathize with residents who see the rocks as a way to curb criminal activity. He said drug dealing has “definitely gotten worse” in the past couple of years.

On Saturday morning, workers with San Francisco Public Works dropped orange cones around six of the rocks that had been rolled off the sidewalk at some point Friday. One man on the street Saturday, who also did not want to be identified for fear of retaliation, said he was part of a group of bicycle riders who did some of the rock-rolling on Friday.

The boulders were rolled onto the street at least two other times, once on Sept. 20 and another time in the past week or so, said Rachel Gordon, a spokeswoman for public works.

Gordon said sending out crews to return the rocks has consumed department resources that could have been used for other work. She said she hopes people stop rolling them into the street, because they become a hazard for vehicular traffic there.

“We’re working on an authorization process to see which is the best way to move forward,” Gordon said. “It’s unfortunate that people are pushing them off the sidewalk and onto the road. It’s not a safe thing to do.”

A two-man public works crew said Saturday that they tried to push the rocks back onto the sidewalk, but they were too heavy. They said they could not remove the rocks altogether because they were unsure who they belonged to.

A public works vehicle with a hydraulic lift rolled through the narrow road shortly before 1 p.m. Saturday. Two men wrapped heavy-duty straps around the rocks, and navigated them back into place, while a third crew member used hand signals to direct the person operating the lift. They were done by 2 p.m.

The move comes two days after San Francisco artist Danielle Baskin advertised the rocks for free on Craigslist, saying she was appalled at the “hostile act to ward off homeless people.”

A woman who has rented on the small street for 33 years said that calling the rock action a hostile act to homeless people is incorrect.

People sleeping on the sidewalk is not the real concern for residents, said the woman, who did not want her name printed. It’s the giant tents that had made the sidewalk impassable — and those high, 8-to-10-foot wide tents appeared to be mostly, if not exclusively, there for drug dealing. The rocks don’t prevent normal, small-tent campers from setting up, but they are effective at blocking the big tents.

She also said pet owners have had to put shoes on their dogs’ feet to protect them from needles littering the sidewalk. She also said several fires had broken out in the encampments — and another neighbor said there had been several drug overdoses that required ambulances.

San Francisco’s 311 center said it has received 224 calls concerning homeless camps, sidewalk cleanup and other requests on the 200 block of Clinton Park this year.

Rubinoff said he hopes city officials work on a solution, because “The goal is to not have people sleeping on the street.”

“I know it involves more housing and less anti-homeless architecture,” he said.

A man who did not want to be identified told The Chronicle that he filed a complaint with public works officials, because the rocks did not comply with the Americans with Disabilities Act. He tried blocking workers from returning the rocks to the sidewalk on Saturday.

“You’re blocking disabled people from crossing the street,” he said.

Gordon said that while she was not aware of that specific complaint, she said the rocks are not blocking the path of travel, but if there are “other ADA compliance issues,” then the department’s ADA compliance officials will investigate.

Alex Andrist, who lives about a block away from the alley, snapped some photos of the rock-lined street Saturday morning. He said using rocks to block the sidewalk is a “mean and ineffective thing to do.”

“Why they are here seems ill-advised to me,” Andrist said.

Roland Li, Lauren Hernández and Steve Rubenstein are San Francisco Chronicle staff writers. Email: roland.li@sfchronicle.com, lauren.hernandez@sfchronicle.com, srubenstein@sfchronicle.com