A female Army officer attempted suicide after being raped in her sleep by a male captain, a court martial heard.
Captain Nathanael Rennie allegedly entered the woman's bedroom before having non-consensual sex with her, leaving the female officer feeling 'violated and so dirty'.
The female officer - who cannot be named for legal reasons - told the court she then set out to take her own life, but was saved by her best friend after finding her while on a run.
At the time of the alleged incident, both Rennie and the woman were officer cadets at Berkshire's Royal Military Academy Sandhurst - the Army's world-famous training centre, which Princes William and Harry attended.
Rennie, of the 104 Theatre Sustainment Brigade, denies rape at Bulford Military Court in Wiltshire. He claims the woman was awake and consented.

Captain Nathanael Rennie, wearing a pink tie and suit, outside Bulford Military Court Centre

Captain Rennie allegedly entered the woman's bedroom while she was asleep at Sandhurst
The court heard the pair, who did not know each other 'particularly well', had been drinking in the afternoon at an event, where the alleged victim had an argument with another cadet.
She then returned to her room and went to sleep. She slept naked and did not lock her door.
Commodore Matthew Rees, prosecuting, said: 'When she woke up, Capt Rennie was raping her.
'Except she didn't know it was him because she was facing the wall. She knew someone was raping her but didn't know who it was. She froze.
'She remembers him whispering and asking if she was OK. After 15 minutes she came around.
'At this point she asked him to get out of the room to which he responded, "Can I at least finish?"
'She told him to get out and he left.'
The pair texted each other on Facebook Messenger around half an hour later.
The messages included her saying: 'You have a girlfriend. Why did I wake up and you were f***ing me?'
She denied his claims she had been awake, saying she does not sleep talk.
He said: 'I just want you to know that there is nothing malicious about what I am doing. I am really sorry.'
When he asked what she wanted to happen, she replied: 'To just erase my memory.'

Rennie and the female officer were cadets at Berkshire's Royal Military Academy Sandhurst

Officer cadets take part in the Commissioning Course No. 232 Sovereign's Parade in 2024
Despite being seen by a medical officer due to her mental health issues shortly after, she decided to not report the incident due to worries about how it would affect her position in the Army.
After graduating, she moved to a different base but suffered a 'breakdown or panic attack' when she was informed Rennie was moving to the same camp.
Later, at a military event Rennie also attended, she told him: 'You are the one who raped me in Sandhurst'. They then had a 15-minute conversation which turned into an argument, in private, where he continued to deny it.
A senior officer reported the issue to service police after overhearing the dispute. Rennie was then arrested and interviewed under caution.
Bulford Military Court was also shown a video recording of a police interview with the alleged victim, throughout which she was seen crying and upset.
She said in the interview: 'I was really unwell and struggled with my mental health at Sandhurst.'
When talking about the alleged rape, she said: 'It absolutely threw me for six.'
She said that when she woke up, she could feel his shaved body and sweat but did not know who it was initially as she was facing the wall.
She said: 'When I saw it was Rennie, I didn't know him. I had barely spoken to him.'
When asked how she felt afterwards, she described the feeling as 'dirty'.
After their conversation the next day, she said: '[I felt] stupid that I froze. Stupid that I didn't report it. It was almost like I was questioning myself.
'I was angry but felt so stupid. I felt violated and so dirty.
'I almost felt I had a conversation for his benefit and not mine. Reassurance that I was not going to report it.'
The woman said its impact meant in the weeks after, she was removed from the ranges at Sandhurst. She then set out to take her own life.
She said: 'The next morning I went out with the intention to commit suicide.
'For some reason that morning my best friend in a different platoon went out on a run and went on a completely different route. She bumped into me and she realised what was happening.'
She said she decided to change the layout of her room after the alleged incident so she would not be reminded about it.
She added: 'I was still suffering with symptoms of PTSD. My new OC [Officer Commanding] I don't personally think recognised PTSD, so tried to get me removed from the course.
'I had to prove to the medical officer that I was still suitable to be on the course.'
She added that she asked to be taken off certain exercises that required her to be woken up at night.
When asked about why she did not initially report it, she said: 'One of my biggest fears why I didn't report it was I had a sense of shame with the guy I was seeing.
'It was almost like I was ashamed of it.
'I know what people are going to say about it because of the mental health issues I was dealing with.
She added: 'It has taken me years to recover and he was just living his life.
'I genuinely believe if I had reported it back then I don't think it would have gone for me.
'If they are barely moving how the f*** is that consent? The Gisele Pelicot case came up.
'I think people assume that a rapist is someone who is obvious.
'I am in a position of responsibility and if I don't have the courage to do it then how can I expect my soldiers to do it. After the Gisele Pelicot case I reported it.'
Rennie told military police the woman was awake and gave him a 'clear yes'.
The trial continues.