Several homes in the same block of flats were evacuated as police dealt with the incident in Kinglassie, Fife.
Officers were called to Mina Crescent at around 7.35am on Saturday.
A fleet of emergency services vehicles, including fire appliances and ambulances were also in attendance.
It is understood that the situation escalated after fire officers were called to tackle a blazing 4X4 vehicle outside a property in the street.
The village was sealed off at either end by Police Scotland, with officers turning all traffic back.
There no reports of any injuries.
Officers from the specialist firearms unit were called in and shouting could be heard from within the property.
Police said a 45-year-old man has been arrested and charged in connection with the incident.
There were no injuries and the evacuated residents were later allowed to return home.A Police Scotland spokesman said: “A 45-year-old man has been arrested and charged in connection with an incident on Mina Crescent, Kinglassie which started around 7.35am on Saturday, 18 December.
“There were no injuries reported. The man is due to appear at Kirkcaldy Sheriff Court on Monday, 20 December.”