A convicted drug trafficker killed a man in a hammer attack after the victim ran up a £200 debt he was unable to pay.

William Richardson, 35, formerly of Park Brae Gate, Ruchill, Glasgow, turned up at a house in Kelty, Fife, and went into a bedroom where Colin Oliphant had been resting.

He repeatedly assaulted him while others in the property heard Mr Oliphant say: "Sorry Willie, don't hit me, stop it Willie. What are you doing with that? Dinnae, dinnae."

Richardson then emerged from the room with his injured victim walking behind him.

The killer told him: "You know I am a boxer". He then punched him on the nose.

Richardson, who was jailed in 2013 for supplying heroin, drove off from the house with others and was described as acting "full of bravado", the High Court in Edinburgh heard.

Advocate depute Bill McVicar told the court: "The now deceased quickly began to struggle to breathe with his face swelling and asking for help, pointing to his neck."

An ambulance was called but the attack victim's face and throat continued to swell after he was placed in the vehicle.

The swelling also spread to his arms, legs and body.

Mr Oliphant, 38, went into cardiac arrest and despite efforts to save him he died.

The cause of death was later given as complications of chest trauma.

The prosecutor said the fatal injury inflicted on Mr Oliphant, a father-of-one, was a fracture of a rib on the left side of his back that had splintered bone and punctured a lung.

Mr McVicar said: "As a result, air leaked out of the left lung every time the deceased took a breath.

"The air leaking out filled the right side of the chest cavity causing it to crush the right lung."

Richardson was originally charged with murdering Mr Oliphant in the attack on Keltyhill Avenue on September 6 last year.

He admitted a reduced charge of culpable homicide on Friday. He pleaded guilty to repeatedly punching the victim on the head and body and repeatedly striking him on the body with a weapon and killing him.

Mr McVicar said: "The deceased Colin Oliphant sourced cocaine for onward supply from the accused."

He said the victim had become indebted to Richardson due to his own use of drugs and was unable to pay what he owed.

The prosecutor said before the fatal attack on him he had expressed concern that he could not pay £200 for drugs he had obtained.

After the assault, Richardson returned to a house in Ballingry, Fife, where he was living with a woman and told her the victim had been "causing issues at work", Mr McVicar said.

He later informed her the victim was dead and he appeared to be in a state of shock, the court heard.

Richardson later called the mother of his two children and said he had got into a fight and done something stupid.

He said he had "hit someone on the back with something, stating he had just reached for the first thing".

Richardson also said he was "going away for a long time".

He turned up at Dunfermline police station on September 8 and said he wanted to speak to detectives before telling an officer: "There were witnesses there. I've never done an assault before."

Police later seized clothing, including gloves, that Richardson had been wearing at the time of the attack and found blood matching the DNA of Mr Oliphant.

Defence counsel Donald Findlay QC told the court Richardson had gone to the police station "clearly distressed" after discovering Mr Oliphant had died.

The judge, Lord Woolman, deferred sentence on Richardson for the preparation of a background report and remanded him in custody.