The 38-year-old was arrested after the incident on Friday at 16:00 BST in the penthouse restaurant of the Meridian Tower, Swansea.
South Wales Police confirmed he was on bail but being held in a secure unit and was being assessed.
A Taser was used to subdue him at the Grape and Olive following a two-hour stand off.
Supt Andy Kingdom said: "An incident of this nature is almost unheard of in this area and it has shocked local people and the wider community.
"It is, of course, an isolated incident and whilst people will be talking about it for a long time, they should not live in fear as offences involving a firearm are extremely rare.
"We have police officers who are specially trained to deal with these situations, and I would like to commend my officers, but also those innocent people caught up in the incident, for the bravery and cooperation they showed throughout.
"I would also like to reiterate my appreciation to those who may have been affected by disruptions while the incident was ongoing."
Nobody was seriously injured in the incident, which began in the busy restaurant on Friday afternoon.
Staff quickly emptied the restaurant, helping some customers down the stairs, and armed police surrounded the 90m (300ft) building.
Spanish football team Villarreal were staying opposite the building in the Marriott hotel ahead of their pre-season friendly against Swansea City on Saturday.
A man has been sectioned under the Mental Health Act following an alleged armed siege in Wales' tallest building.