Firefighters aimed water jets at the window of a Cowdenbeath flat during a six-hour stand-off with a man that prompted the attendance of three armed police units and multiple riot officers.
Members of the public were urged to stay away as more than 14 police vehicles and a dog handling unit descended on Watson Street.
Police were called to a “concern for person” report at 12.20pm on Friday.
Specially trained police negotiators arrived just before 3pm.
Around 4.20pm, firefighters sprayed water at a first-floor window due to a suspected fire, with smoke coming out of the property.
Witnesses heard swearing and shouting from the flat as paramedics arrived.
The stand-off in the Fife town ended at 6pm.
One eyewitness said: “Armed police officers, as well as others wearing protective armour and carrying riot shields, entered the building around 5.45pm.
“Shortly before 6pm, armed officers left from a side entrance.
“Police then removed the cordon, which had been in place for four hours, and emergency vehicles started to pull away.”
One Watson Street resident described the situation as “a mess”.
She added: “Police officers have been trying to coax him out all afternoon – the emergency response is huge.
“I’ve never seen such a scene like it.”
Police told residents living below the upper-floor flat that a fire had been extinguished.
‘Multiple sirens’ alert Cowdenbeath resident to police stand-off
Officers in riot gear positioned themselves at a side entrance to the property, at the corner of Watson Street and Thistle Street.
Two fire appliances also attended the scene.
One resident said he was first aware of the incident when he heard “multiple sirens” in the street.
He said: “I looked out to see police arriving – one after another.
“I went outside and there’s a lot of shouting coming from one of the houses.
“I was told that there was a risk of gas and told to stay inside.”
Another man says he was told by police that no residents were allowed to access the garages opposite the house.
He added: “Police started arriving not long after 12pm and immediately went to the house.
“Fire crews arrived a short time later and they sealed off the street.
“Firefighters are on standby while there’s lots of police officers in the street and around the house.”
Before the stand-off concluded, a Police Scotland spokesperson said: “Officers remain in attendance and the incident is contained, however, members of the public are asked to avoid the area at this time.”
Earlier on Friday, a spokesperson for the Scottish Fire and Rescue Service: “We were called to a police incident in the Cowdenbeath area at 12.24pm.
“Two crews are on standby at the scene.”
Conversation