SAN FRANCISCO (KCBS) – Saint Mary’s Cathedral in San Francisco will dismantle a system that pours water on entrance areas of the church frequented by homeless after receiving a formal notice of violation from the city.

Meanwhile, the San Francisco Archdiocese has apologized for the ‘misunderstood’ and ‘ill-conceived’ effort to keep homeless out of alcoves used to enter and exit the church.

Raw Video: SF Archdiocese Apologizes For Homeless Sprinkler System

In a story first reported by KCBS Radio’s Doug Sovern, the principal church of the San Francisco Roman Catholic Archdiocese used the watering system to keep the homeless from sleeping in the cathedral doorways. The archdiocese acknowledged Wednesday it had been using the system for the past two years.

But the system also drenches some homeless people and violates city building and safety codes.

After inspecting the cathedral, the San Francisco Department of Building Inspection filed a notice of violation against the archdiocese and the cathedral, giving them 15 days to remove the system. In response, the archdiocese has taken out a plumbing permit to remove the entire watering system, which was observed to run for about 75 seconds every 30 to 60 minutes.

Word of the cathedral’s homeless deterrant has caused an uproar on social media. However, the rector of Saint Mary’s Cathedral and the Auxiliary Bishop of the Archdiocese, Bishop William Justice, issued a statement defending the role of the archdiocese and the cathedral in supporting homeless programs.

Bishop said the sprinkler deterrent system has been in use for the last two years and modeled on similar systems used in the city’s Financial District “as a safety, security and cleanliness measure to avoid the situation where needles, feces and other dangerous items were regularly being left in these hidden doorways.”

The idea was not to remove those persons, but to encourage them to relocate to other areas of the Cathedral, which are protected and safer. The purpose was to make the Cathedral grounds as well as the homeless people who happen to be on those grounds safer.

We are sorry that our intentions have been misunderstood and recognize that the method used was ill-conceived. It actually has had the opposite effect from what it was intended to do, and for this we are very sorry.

Justice said since the archdiocese has learned the system required a permit and may violate the city’s water-use laws, work to remove this system would be completed by the end of the day.