The man was arrested yesterday morning after he damaged a Princes St business and then moved on to the Civic Centre building in the Octagon, where he smashed up the reception area.
Before the arrest, police had been searching for the man in Mosgiel, and a police spokeswoman said they were alerted to an online threat made against several people in Dunedin yesterday morning.
As a result, police ensured those named in the threat were informed and kept safe.
Dunedin city councillor Sophie Barker said she was entering the building when she heard yelling and loud bangs coming from the foyer.
"I heard this huge bang and then the guy came out and went down the escalator.
"It was awful. It was horrible. It was scary just to listen to. I thought a bomb had gone off, actually."
Ms Barker said staff were also badly shaken and many were tearful.
The reception area was full of broken glass and overturned furniture.
Council chief executive Sandy Graham said the customer services centre was closed yesterday following the incident, which resulted in extensive damage to the reception area and the nearby 10 year plan public engagement space.
"Thankfully, no-one was injured.
"Staff are being supported following what was a traumatic incident, but we are pleased by the way they responded."
The council had CCTV footage of the incident and would be working with police, she said.
Yesterday morning’s council meeting also adjourned briefly so councillors could be briefed by Ms Graham on the incident.
A witness, who declined to be named, said he saw a man walking across the Octagon towards the council entrance with what he thought was a baseball bat.
"He destroyed a sign outside the DCC and then he went inside and you could hear him destroying everything.
"I grabbed an old guy and pulled him out of the doorway and told him ‘to get the hell out of here because you don’t want to be standing there when this guy comes out’.
"I took him out and the cops arrived soon after."
The man is expected to appear in the Dunedin District Court this morning.