Armed police and dog handlers laid siege to a north-east flat yesterday during a tense stand-off.
The Meethill area of Peterhead was shut down for five hours, with neighbours were told to close their curtains and remain indoors.
Armed officers stood with their guns in the middle of the police cordon, while a negotiator appeared to be in talks with a man inside.
About 15 houses surrounding the boarded-up property were sealed off while the team dealt with the disturbance.
More than a dozen officers were called to the ground-floor property on Meethill Place at about 8.10am.
Officers in charge of moving bystanders on said that the attention was making finding a solution to the siege “difficult”.
However, the incident was resolved by about 1pm, and police last night confirmed a 43-year-old man had been taken into custody.
Inspector Simon Reid, of the Buchan community policing team, said: “Officers wish to thank the local community for their cooperation as we appreciate there was some disruption in the area as a result of the operation in the Meethill Place area.
“I would like to assure people in the area there is no threat to the wider public, but there will be a police presence in the area while inquires continue.”
Nearby neighbours yesterday spoke of waking up to the drama.
One man, who did not want to be named, said he had lived on the street for five years and never witnessed any trouble before.
“I wasn’t allowed out – I don’t even know the boy involved,” he added.
“I was out of my bed this morning at about 8.15am and all the police cars were there, that’s all I know. I asked one policeman what was going on, but they’re not allowed to tell you anything.
“I’ve never seen anything like this happen, it’s a new experience for me. I’ve lived in this house for five years and I’ve never seen that before. I wasn’t worried, though, there was so much police here.”
Another neighbour added: “I’ve never seen anything like it before – machine guns and dog units. It was crazy.”
Last night, the street was reopened although police tape remained around the house at the centre of the incident, and officers could be seen inside.
Two specialist ambulance response teams were called to assist police as well as fire crews.
Local councillor Anne Allan, vice-chairwoman of the town’s community safety group, said incidents involving such large numbers of police were an uncommon sight in Peterhead.
She said: “This sort of thing is extremely unusual for Peterhead.
“This is not the sort of thing we like to see happening in the town, however I am very glad that it’s all ended peacefully. All the emergency services have to be commended – I’m just glad it’s all over.”