An 18-year-old trainee soldier tried to stab a fellow trainee in the head after an alleged bullying incident in their dormitory, a court martial heard.
Private James Farrell plunged a knife downwards at Rifleman Curtis Horbury as he lay in bed texting in their dormitory at Catterick Garrison in North Yorkshire, said Commander Douglas Ward, prosecuting.
Commander Ward said Rifleman Horbury rolled out of the way and the knife struck the mattress with force.
Rifleman Farrell, who was with the 2nd Infantry Training Battalion at the time, denies attempted murder.
The defence say he had intended to scare Rifleman Horbury but not to harm him.
Commander Ward told Monday's hearing at Merville Barracks in Colchester, Essex, that Rifleman Farrell left the dormitory after a "heated discussion" with other trainee soldiers on the evening of November 13th 2016.
Rifleman Horbury said topics had included Rifleman Farrell wearing the wrong uniform on Remembrance Sunday, which unit Rifleman Farrell had originally wanted to join and his home background.
Questioned by Brian Russell, defending, Rifleman Horbury said his involvement was banter and not bullying, and was "friendly as it's two way".
"There's that line where banter does get to bullying but Farrell never said I was bullying," he said. "If he said 'that's a bit harsh' it would stop."
He said Rifleman Farrell returned into the dormitory, which had its main light off and the curtains drawn, minutes later in the early hours of November 14.
He said he became aware of Rifleman Farrell's silhouette in the doorway but continued to text on his mobile phone until he heard the "click of a knife" opening around a metre from his bed.
In cross-examination, Rifleman Horbury accepted Rifleman Farrell had time to use the knife again before another soldier intervened but he did not.
Rifleman Horbury added: "These nights would happen quite a bit throughout the course but nothing like that had ever happened before."
Rifleman Scott Bacon, a trainee soldier who also shared the dormitory, told the court he got off his bed and "grabbed" Rifleman Farrell afterwards, asking him what he was doing.
"He said 'I really don't care, he's been bullying me for three months'," said Rifleman Bacon.
The trial, before Vice-Judge Advocate General Michael Hunter and a board of five military officers in uniform, resumes on Tuesday.