Updated

A man who sneaked a bag of his feces into a San Diego courtroom during his trial, smeared it on his lawyer and threw it at jurors has been sentenced to 31 years in prison.

Superior Court Judge Frank Brown on Monday sentenced Weusi McGowan for robbery, burglary, and two assault charges stemming from the feces-flinging incident during his January trial.

McGowan, who attorneys say suffers from mental illness, had asked for a mistrial because he believed jurors had seen him in restraints when he entered the courtroom.

Several days after his request was denied, McGowan pulled out a bag of excrement he had hidden in his clothing, rubbed it on his lawyer and tossed it at the jury, hitting one juror's computer case.