A schoolboy charged with murdering a fellow pupil has denied stabbing his victim, claiming he simply wanted to scare him.
The 16-year-old, who cannot be named for legal reasons, said he was annoyed and upset after hearing that Luke Walmsley had been sending notes to his girlfriend.
He also admitted that he had never got on with Luke, and believed that the 14-year-old had been making threats to fight him and had made comments about his mother.
Luke died after an incident at Birkbeck school in North Somercotes, Lincolnshire, on November 4 last year.
The boy said he had held out the knife to scare Luke and the schoolboy had walked straight into it.
The teenager, who denies murder, this week gave evidence at Nottingham crown court for the first time since his trial began almost a fortnight ago.
Earlier in the week, the jury was told that Luke had been stabbed through the heart with such severe force that the knife had penetrated his breastbone.
Teacher Carol Mortimer told the court how the defendant smiled as he handed her the bloodied knife from behind his back after Luke was wounded.
The defendant said: "I didn't want to fight Luke. I thought if I showed the knife it would prevent him from fighting. I was just going to say something to him just to scare him. I was just going to show it to him.
"I thought I would confront him. Just by saying something like 'back off me or (my girlfriend)' or something. He just walked straight into me."
Sasha Wass QC, defending, asked him how he felt after the incident. The boy said: "I was just in shock. I didn't know what to feel. I was gutted. What we had been arguing about seemed pointless."
Yvonne Coen QC, prosecuting, suggested that the idea that Luke had walked on to the blade was "complete nonsense".
The defendant demonstrated to the jury with a ruler how he held the 7cm blade out in front of him as Luke walked towards him.
Ms Coen said: "It was certainly unexpected as far as Luke was concerned. He didn't have a chance to defend himself." She added: "You knew that if you push a blade the full length of it into someone's chest you know that it would do them really serious harm."
He replied: "It was an accident."
Dr Mark Rouse, a pathologist for the defence, said the fatal wound was not consistent with the claim that Luke had walked into the blade.
The case was continuing as The TES was going to press.