Officers were called to Stewart Place in the village of Wanlockhead in Dumfries and Galloway at around 8.20pm on Saturday.
A 17-year-old man had allegedly threatened another man with a knife and police set up a cordon around a property and called in an armed response unit. The teenager gave himself up after around an hour.
A force spokesman said: "Police attended and the area surrounding the incident was cordoned off to ensure public safety. Armed police officers traced the male a short time later and the incident was brought to a safe conclusion."