A man slashed his friend's throat and left him to die after the friend bragged about sexually abusing a six-year-old child, a court in the UK has heard.
Christopher McMahon, 48, is on trial after allegedly leaving David Potter, 50, for dead on the floor of his flat in south London.
McMahon is said to have repeatedly stabbed his friend in the early hours of August 21 last year.
Potter had convictions for sex offences against children and was only foud five days later when police entered the property after another friend became concerned that he hadn't been in touch.
The jury has heard about how, after the stabbing, McMahon went to his partner's house, still covered in Potter's blood, and said "I've done it".
"Mr McMahon said he had slit a man's throat and indeed he had," Prosecutor Sarah Whitehouse QC told jurors during the trial.
"Mr McMahon admits he was the person who stabbed Mr Potter to death," she added. "The question for you will be why Mr McMahon did that."
The two men, who'd been friends for a while, were drinking at Potter's house, above a convenience store, the night of the incident.
"There is no doubt that in the early hours of that morning Mr McMahon stabbed Mr Potter repeatedly," the prosecutor said.
"The reason I can say that there is no doubt about that is because Mr McMahon has now admitted it.
"His clothing and shoes were covered in Mr Potter's blood and the trainers he was wearing left footprints in blood all over Mr Potter's flat.
"After stabbing Mr Potter in the early hours of that morning, Mr McMahon left him dead or dying face down on the floor of the flat."
His body was found by police, in a pool of blood, on March 26.
The two were not said to be particularly good friends but bonded over "an interest in alcohol".
When he got to his partner's house, banging on the door, soaked in blood, his partner asked McMahon if he'd hurt someone.
"Yes, I have hurt a paedophile," he reportedly said.
The following day, she called the authorities.
McMahon denies murder and the trial continues.