A Toronto man accused of dumping buckets of feces on five people in Toronto has been granted bail.

Samuel Opoku 23, has been charged with five counts of assault with a weapon and five counts of mischief interfering with property.

According to Toronto police, Opoku allegedly threw buckets of "liquefied fecal matter" in three separate attacks. Two of the feces attacks occurred inside university libraries, police said.

He was granted bail on Wednesday at Old City Hall in Toronto and is due to reappear in a Toronto courtroom on Dec. 23.

Opoku's lawyer says his client is contending with mental health issues, but offered no details.

Jordan Weisz did not share the conditions of Opoku's bail, but says they were set after close collaboration between Crown and defence lawyers as well as the judge.

Samuel Opoku, 23, has been granted bail after allegedly throwing feces on people in three separate attacks. (Pam Davies/CBC)

Weisz said he personally believes Opoku's release poses no threat to the public, adding others have clearly reached the same conclusion.

"Bail court is not a court where you decide that because you're repulsed by something you're going to take action," he told reporters after the hearing. "Bail court is a court that determines, prior to trial, whether somebody can be released into the community and that the community, at the same time, can be safe."

Police said the incidents allegedly involved three women, one man and a child.

On Nov. 22 at about 5:20 p.m., police allege Opoku entered John P. Robarts Research Library, at 130 St. George St., on the University of Toronto downtown campus and emptied a bucket of feces over a woman and a child seated at a table.

On Nov,. 24 at 5 p.m., police allege he entered Scott Library, at 4700 Keele St., at York University and threw fecal matter onto a woman and a man.

On Nov. 25 at 11:55 p.m., police allege he approached a woman in the area of College and McCaul streets and emptied a bucket of feces over her.