A council has "apologised unreservedly" after a man was locked inside a public toilet for more than 24 hours.
The man had entered the toilet block on Monday, the day it was due to be closed as part of cost-cutting measures.
Cleaning and maintenance staff knocked on the door but failed to look inside before completing the final locking-up at 7am.
Police were alerted more than 24 hours later, when a passer-by heard the man's cries at 10.30am on Tuesday.
A spokesman for Bath & North East Somerset Council said: "We apologise unreservedly to the man in question, who is fortunately unharmed by this incident.
"We have now taken action with our contractors to ensure that they follow procedure so that this cannot happen again."
Contractor Healthmatic, which manages facilities for the council, admitted that staff had not followed "correct procedure".
"Healthmatic's cleaning and maintenance staff did the final locking up of the toilets on Monday," a spokesman said.
"They knocked on the door as a check and no response was received. It was not opened and visually checked - this should have been done as correct procedure.
"All the disabled toilets have an emergency alarm - it seems that when the man awoke on Tuesday morning, he sounded the alarm via a pull cord in the toilet and he also banged on the door. This was heard by a passing member of the public who alerted the police, who in turn called Healthmatic."
The spokesman said a Healthmatic employee was on the site within 10 minutes of the call and offered to take the man to hospital or to a doctor, which was declined.
"He was offered food, which he accepted, and walked away unharmed," he added.
" The man said that he was happy with the outcome to the Healthmatic staff and police."