A teenager has admitted stabbing a man to death with the victim's knife at a flat in Camelon, near Falkirk.
The youth claimed he disarmed James Baillie, after he turned up at the flat to rob him with his half-brother, George Merrilees.
Following a struggle, the teenager took the knife from Mr Baillie and stabbed both men, killing Mr Baillie.
The teenager, who cannot be named, admitted charges of culpable homicide and assault to severe injury.
The High Court in Edinburgh heard that Mr Baillie, 40, had bought drugs from the youth, who was living in Burnside Court, in June this year.
The court was told that Mr Baillie and Mr Merrilees had agreed to rob the accused, with the drugs to be split between them afterwards.
Advocate depute Chris McKenna said: "The deceased was in possession of a large knife in a sheath and a Swiss Army knife and Merrilees had a police-style extendable baton."
Mr McKenna said that after the men arrived at the flat there was a struggle that resulted in the accused taking the knife and stabbing them.
The youth was confronted by neighbours and responded: "They tried to rob me."
The accused was punched and dropped the knife before running out of the flat.
He subsequently handed himself in at a London police station more than two weeks after the killing.
Defence counsel Derek Ogg QC said that the youth had sustained defensive injuries during the incident.
Judge Lord Beckett deferred sentence for reports and remanded the teenager in custody.