The centre of a Fife village was put into lock down as armed police were drafted in to an incident on Friday evening.
Part of Newburgh High Street was sealed off and locals said they were told to keep their doors locked.
Following what was described as a disturbance in the street officers surrounded a flat.
After almost three hours a 36-year-old local man was arrested and is expected to appear in court on Monday.
Witnesses reported seeing up to 10 police vehicles and police dogs at the scene, as armed officers stood guard.
A spokesman for Police Scotland said: “At about 2030 hours on Friday, February 23, police officers dealt with a male causing a disturbance in the High Street in Newburgh.
“The male entered a flat nearby and after a period of prolonged negogiation the male was compliantly arrested.
“A 36-year-old man is in custody.
“No injuries were sustained.”
A witness said that the man had been shouting in the street and added: “The next thing all the armed police and police dogs were outside a flat and no one was allowed near until they arrested him.”