SAN FRANCISCO (AP) — A San Francisco homeless man accused of masturbating in public has been cleared after a jury found he was merely trying to urinate against a wall.

The San Francisco Public Defender’s Office said that 46-year-old Anthony Richey was facing up to six months in jail and lifetime registration as a sex offender before he was found not guilty Monday.

READ MORE: COVID: Initial Vaccine Booster Availability Met with Low Turnout, Confusion

Richey was charged with indecent exposure and lewd conduct after a passer-by called 911 in July to report a man was masturbating in a street corner alcove in the Tenderloin District.

READ MORE: UPDATE: Thousands Forced To Flee Fawn Fire; New Evacuations Ordered South Of Shasta Lake

During trial, the defender’s office said the 911 caller conceded Richey could have been urinating.

Physicians also testified that Richey had a 10-year history of medical problems that made urination difficult.

MORE NEWS: Amazon Purchases Land In Pleasanton For Undetermined Project

(© 2010 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)