A man who killed his drug dealer in Fife over £10 has been warned to expect a lengthy prison sentence.
William Paterson, 46, repeatedly stabbed James Beveridge, 41, in the head, neck and body in Kirkcaldy on 15 October 2016.
Paterson pleaded guilty before judge Lord Armstrong to culpable homicide.
The High Court in Edinburgh heard on Friday how Paterson had fallen out with Mr Beveridge because he wanted to buy drugs on credit.
Police also suspected Paterson wanted a refund over "dud" Valium tablets which he had previously purchased from Mr Beveridge.
However, the dealer refused to do business with his client, and after the pair exchanged text messages they met up with each other.
Prosecution lawyer Ashley Edwards told the court Mr Beveridge sustained cuts to his head and a wound to the left side of his neck.
'Substantial custodial sentence'
Ms Edwards added: "Despite the injury he had sustained the deceased apparently managed to get to his feet telling the accused that 'You're going down for a murder all over a tenner.'"
The court heard that medical staff tried to save Mr Beveridge's life, but he died the next day.
Lord Armstrong told Paterson: "You have pleaded guilty to a grave crime. There are no circumstances which can justify the taking of another person's life.
"It is inevitable that a substantial custodial sentence will follow."
Sentence was then deferred for the court to obtain reports about Paterson's character. He will be sentenced at the High Court in Glasgow next month.
Det Ch Insp Rory Hamilton, of Police Scotland, said: "A man has lost his life and another now faces prison over a debt amounting to just a few pounds. This was a tragic incident and I wish to extend my sympathies to James's family and friends.
"It was an isolated incident with both the deceased and the offender known to each other, but it still affected the community in Kirkcaldy and I'd like to thank them for their assistance and support during this investigation."