A ten hour armed siege came to an end with the arrest of a topless man at Rotherham town hall.
The 36-year-old is being questioned by officers on suspicion of burglary.
Police brought the man, who was topless, out of the building after hours of negotiations at around 7.30pm on Saturday night.
They said the incident was resolved peacefully.
“The man left the premises of his own accord,” said a South Yorkshire Police official.
“He was arrested on suspicion of burglary and is currently being questioned by officers.
“We would like to thank members of the public for the patience demonstrated during the operation.”
An eye witness said: “Just before 7.30pm he was banging about and seemed to be trying to put the window through.
“There were people stood outside trying to talk to him - police officers and one family member I think.
“At about 7.30pm they brought him out. He came out with no top on and blood on his chest.
“He was shouting and the police put him in their van.”
The man, who is thought to have been previously armed with a hammer, set off the alarms at Rotherham town hall on Saturday morning at about 9.45am.
Police were called and it turned into a full-scale response involving police cars, riot vans, fire engines, ambulance responders and other emergency support units. The whole town hall site was taped off.
No hostages were involved. Specialist trained negotiators, police officers and riot police with shields had been going in and out of the town hall via a front entrance all afternoon. At one point, a man exited the building with blood spattered on the side on his head.
Earlier in the day, one passer-by said: “I just saw all the police cars coming up the road this morning so I came to see what was going on.
“Apparently he got in through the roof. It’s been a very long stand-off.”
The Crofts was closed to traffic while negotiations continued.
Chantelle Hubbard, aged 17, of Maltby, said: “I saw the riot vans come and the police dogs.
“It’s scary because this is where we come to chill out. It’s scary somebody could be capable of threatening to hurt either themselves or others.”
Her friend Emily Parker, also 17, of Whiston, said: “The first things I saw were the police cars and the police tape.
“This is where we come for a day out so it’s a shock that this is happening.”