The mayor of Abbotsford is apologizing after city staff was caught spreading chicken manure over land used as a camp by the homeless.

Abbotsford Mayor Bruce Banman told reporters Thursday he "knew nothing" of the plan, which he called "a stain on the city."

"We are deeply apologetic for any hurt this may have caused. I personally feel incredibly bad," he said.

"I was shocked, and embarrassed, like many of us were."

Banman said he hopes members of the public have compassion for city staff and treat the incident as a learning opportunity.

"All I can say is we will learn from this," he said.

Banman did not reveal who ordered the manure dumped in the area, saying the buck stops with him and city manager George Murray.

He went on to personally apologize to several men who camp at the site, including one whose eye was swollen due to a bacterial infection he blames on the manure.

The incident came to light after local advocate James W. Breckenridge wrote a column titled "This Stinks" in the Abbotsford Today newspaper.

Murray said in an email obtained by CBC News he was "sorry" and takes the situation very seriously.

The City of Surrey used a similar tactic in 2009 — spreading chicken manure outside a busy resource centre for the homeless — but was forced to remove it following outrage from community members.