A teenager accused of murdering a school friend in woodland said today that he had no memory of carrying out the attack.
Craig Roy said he was "terrified" when he realised 16-year-old Jack Frew was lying on the ground with his throat cut because he thought he could have been the one who knifed him.
Roy, 19, was giving evidence for the second day in the trial at the High Court in Glasgow.
He is accused of murdering Jack in East Kilbride on May 6 2010. He denies the offence.
It is alleged that Roy repeatedly struck and stabbed Jack in the neck and body with a knife.
The trial has previously been told Jack was left with 20 separate stab wounds and a slash across his throat.
The jury was told today that at an earlier hearing Roy had entered a guilty plea to culpable homicide, but it was rejected by the Crown.
Roy said he had taken a knife out after Jack had exposed his erect penis during a walk.
He said he thought the younger man had wanted either oral or penetrative sex.
The trial has previously heard that Jack was "blackmailing" Roy by threatening to tell Roy's boyfriend about an earlier sexual encounter.
Roy said the next thing he remembered was Jack lying bleeding on the ground.
He said: "I remember being angry. Extremely angry.
"Jack was lying on the ground. I was trying to help him. He was bleeding from the neck.
"I was still holding the knife. It was covered in blood.
"I was terrified that it was me that had caused this to Jack.
"I was crying quite a lot."
His lawyer, David Burns QC, asked him: "Do you accept that it was you who delivered these many blows?"
He replied: "I came to that conclusion. Even now, logically, I accept it, but part of me just won't accept it."
Mr Burns asked him: "Do you take responsibility for the killing of Jack Frew?"
The teenager replied: "I don't want to believe it, but, logically, yes."
Roy also spoke of the impact Jack's death had had on his family: "Obviously I can't imagine what they think.
"They lost a son. He wasn't just a son - he was a friend, a best friend, a nephew, a cousin. He was a lot of things to a lot of people.
"If I could make things right again, I would. But I can't."
Members of Jack's family wept during Roy's evidence.
The trial, before Lord Doherty, continues.
Roy broke down in the witness box and the trial was adjourned.
He wept openly during cross-examination from the advocate depute Jennifer Bain.
She had been asking him about a text sent to him by Jack on the night he died.
He previously told the court that he had been angered by the message, which contained a sexually explicit desire.
Ms Bain asked him why his mother and sister had not noticed he was angry.
When she asked him if he was close to his sister, he began to cry.
Ms Bain previously accused Roy of trying to paint Jack "in a bad light" by claiming he was blackmailing him.
She said: "There wasn't blackmail, was there? You just felt guilty about what you had done with Jack Frew.
"It was your guilt that caused you to take the knife on May 6."
He replied: "I didn't want him blackmailing me. I was quite impulsive, otherwise I wouldn't have taken the knife. It goes against my morals and my beliefs."
She also asked him: "Are trying to say negative things about Jack Frew to try to justify what you have done?"
He said: "No, not at all. You can't justify killing someone."