Emotions boiled over during the eight-hour standoff, which involved a barefoot man who climbed on to the roof of a multiunit house in Neidpath Rd.
Police had to calm angry confrontations at the cordon between neighbours and friends of the man before he eventually came down and was taken into custody about midnight.
The drama began when officers were called to Neidpath Rd about 3.55pm.
Senior Sergeant Anthony Bond, of Dunedin, said a 30-year-old man wanted by police was seen exiting a vehicle on Neidpath Rd.
He fled, making comments that he had a gun and would shoot police officers.
He showed a firearm to police, stashed in his waistband.
That gun was later found to be an imitation.
However, the vehicle the man had been in contained a .308 firearm, along with various knives, clubs and a hatchet.
The man was taken into custody after a protracted negotiation.
He has been charged with unlawfully having a firearm, possession of an offensive weapon and unlawfully getting into a vehicle.
Police have now thanked neighbors for their patience while the siege unfolded.
One neighbour said her 17-year-old daughter was home alone at the time of the incident.
She heard a smashing sound from downstairs and found herself face-to-face with an armed police officer who told her to get out of the house.
Armed police cordoned off the street and by 9pm, about a dozen people from the surrounding streets had gathered in Glenpark Ave.
Some were residents from the building where the man was on the roof. They had to find alternative places to stay.
As darkness fell, a spotlight was used to illuminate the man and police could be heard negotiating with him.
One of the neighbours at the cordon said he was messaged by a resident trapped inside a house in the cordon, who told him the man on the roof was asking police for a cheeseburger, cigarettes and his girlfriend.
About 9.10pm, firefighters brought in a ladder and a stretcher to the cordon, but they were stood down.
Two woman at the cordon, one of whom said she was the man’s sister, told the ODT they were disappointed police were not letting them help negotiate with the man.
Another friend, a young man, was confronted by police after yelling out to the man on the roof. He ran off and jumped in a car and did a U-turn, causing the three officers walking swiftly towards him to pull back as he screeched up Glenpark Ave.
The incident sparked a confrontation between the assembled neighbours and the two women.
One had earlier taken exception to a comment made by a child about police shooting the man.
Heavily-armed officers had to intervene in the shouting match that ensued.
"This is the last thing we need. If you want to go to our cells, carry on," one officer said.
A grandmother who yelled at the women to leave said her daughter had narrowly missed being home when the events unfolded.
"If she hadn’t come to see me today, her kids would have been in that backyard," she said.
They had told the police about various comings, goings and fence-jumpings from the property, but nothing had been done, she said.
"It’s quite terrifying," the grandmother said.
The siege was resolved around midnight, after police successfully negotiated with the man.
A police spokesman said the man has been remanded in custody on existing warrants.