Magistrates jailed a man after hearing of his bowel habits at Todmorden Health Centre.
Raymond Woods, 56, used the toilets over a two month period leaving faeces on the floor and staff refused to clean-up after him.
Woods, of no fixed abode and with 147 previous convictions, admitted breaching an anti-social behaviour order.
He was jailed for 17 weeks and Calderdale magistrates imposed a five year ASBO starting from his release.
The conditions include not entering the health centre unless he has a pre-arranged appointment and not drinking alcohol in a public place in Calderdale.
Clare Benson, prosecuting, said Woods left a lot of mess and faeces and when staff would no longer clean-up after him the toilets were locked and members of the public had to ask staff for a key to use them.
“On July 20 the defendant found them locked and stood in the waiting room saying ‘shall I crap on the floor?’,” said Miss Benson.
When he started to take his trousers down a member of staff unlocked the toilet door for him.
He then realised the cider he arrived with had been taken and started shouting and swearing at staff and patients. When questioned by police he said he could not remember the incident and said he had drunk nine litres of strong cider.
Asamh Khalid, mitigating, said her client was always intoxicated and appeared to be an alcoholic and accepted what he had done.
“He does have a record - 147 convections - including a number of breaches,” she said.
The court heard Woods’s family moved from Manchester to Todmorden in the 1980s and he increasingly turned to drink after the deaths of relatives.
Magistrates said the public needed protecting from Woods’s anti-social behaviour and that behaviour at Todmorden Health Centre on July 20 was so serious only a custodial sentence could be justified.