Jade McCrossen-Nethercott's rape case was dropped by the Crown Prosecution Service (CPS) because of claims she had an episode of a rare sleep condition called "sexsomnia". As a result, the CPS no longer believed they could secure a conviction. But Jade challenged the decision and spent months reinvestigating.
The CPS now admit they were wrong not to take it to trial and have apologised unreservedly to her.
But what went wrong? The BBC followed Jade's case as events unfolded.
It was a Sunday evening in the spring of 2017 when Jade woke up on a sofa in south London to discover she was half-naked, with her necklace lying broken on the floor.
The 24-year-old, originally from St Ives in Cornwall, had the intense feeling she had been penetrated and thought she had been raped while she slept.
Three years later - and just days before the man charged with raping her was due to stand trial - lawyers from the CPS called her to an urgent meeting at a police station.
Her case was being dropped. The CPS lawyer explained that two sleep experts had given their opinions on her case. They said it was possible Jade had had an episode of sexsomnia and could have appeared to have been awake and consenting.
Sexsomnia is a medically-recognised sleep disorder. People with the condition perform sexual acts in their sleep.
A person is deemed not to have consented to sex if they are asleep, according to the law in England and Wales. However, it also states that a person is not guilty of rape if they had "reasonable belief" in consent.
"It came completely out of the blue, and it was baffling," says Jade, who had never heard of sexsomnia until then.
"I've had two long-term relationships spanning 13 years, and I've never had anything like this."
The decision by the CPS meant they would close the case and the defendant would be formally acquitted.
The first time Jade had been asked about her sleep, was in the police station when she went to give a formal statement.
In response to a question from a police officer, she explained that she had always been a deep sleeper and had sleepwalked a couple of times as a teenager.
It was a passing comment, forgotten about in the whole gruelling process until her case was dropped.
It had been Jade's best friend Bel who had dialled 999 and started the whole police process.
She remembers the sound of Jade's voice on the other end of the line. "It was like nothing I've ever heard before. She was hysterical and sobbing, and she said 'I think I've been raped.' When your best friend says that to you, it's just earth-shattering."
The two had been out the evening before at a bar in south London. They had got ready together, drinking prosecco as they did their makeup and headed out arm-in-arm.
It was a fun evening, drinking and chatting. When closing time came, Bel ordered a taxi home. Jade decided to go back to a friend's flat with a few people for a last drink.
At around 02:00, with people still chatting around her in the living room, she curled up under a blanket in the corner of the sofa, fully-clothed, and fell asleep.
At 05:00 she says she woke up to find her trousers and pants were off and her bra was undone. She says she saw a man on the other side of the sofa she was lying on.
"I confronted him saying, 'What's happened? What have you done?' And he said something a bit odd I guess, but he did say 'I thought you were awake.'
"And he just bolted out basically, and left the door open. And I got my phone and started calling Bel…"
Two male police officers arrived and took Jade straight for forensic tests. Vaginal swabs detected semen which would later be matched to the man on the sofa.
The suspect offered no comment when initially questioned by police. The CPS made the decision to charge him with rape. He pleaded not guilty. A date was set for trial.
But it never went ahead.
Jade was determined to prove the CPS were wrong to drop her case, but she had limited time to appeal.
She requested all the evidence - including police interviews, toxicology results, witness statements and the sleep experts' reports - and pored over them.
She was shocked by what she read - and in particular the weight given to the sleep experts' theories.
Neither expert had met her in person, but their opinions had been significant enough to close her case.
The first expert, who had been instructed by the defence, concluded there was a "strong possibility" that Jade had an attack of sexsomnia, saying "her behaviour would have been of someone actively engaging in sexual activity with eyes open and showing pleasure".
The CPS then hired their own expert in response. He concluded that "a history of sleepwalking, even once at the age of 16 years, and ongoing sleep talking or any family history, is entirely adequate to establish a predisposition to sexsomnia".
Jade was speechless. "I don't see how this can be one isolated incident [of sexsomnia], that just so happens to be the time that somebody I would never have consented to have sex with had sex with me," she says.
Jade decided to pay for her own expert opinion and approached Dr Irshaad Ebrahim at the London Sleep Centre. He also has experience of giving expert opinions in rape cases.
Jade's case was the first he had seen where a complainant victim was purported to have sexsomnia. In all the other rape cases he had encountered, it was the defendant claiming to have had an attack of sexsomnia. The BBC carried out extensive research and could not find any other UK rape case where the defence had argued the complainant had sexsomnia.
Dr Ebrahim explained there was limited scientific research and no precise way of diagnosing sexsomnia. But he said people he sees with the disorder are typically male and tend to have a history of the sexual behaviour in their sleep.
Jade then underwent a sleep test - a polysomnography, which monitors brainwaves, breathing and movement during sleep.
The test indicated that she snores and has mild sleep apnea, a common condition where breathing stops and starts during sleep. Both were, according to Dr Ebrahim, potential trigger factors for sexsomnia, so he could not rule out that she may have had an isolated episode.
Jade wanted to know if he could give her a clear idea of what the chances were that sexsomnia had been to blame for what happened.
"That is the billion dollar question," said Dr Ebrahim.
"Wanting a definitive, black and white answer - yes it was or no it wasn't - is not going to happen."
Jade still believed she didn't have sexsomnia - but was frustrated the sleep experts couldn't rule it out.
She turned to a lawyer to find out more about how courts treat the disorder as a defence.
Barrister Allison Summers KC has defended in rape cases where the man accused has claimed to have sexsomnia.
She told Jade that sleep experts are almost never able to say definitively whether someone has the condition - but saying "it's possible" could be enough for a jury to reach a not guilty verdict.
"Do I think, as a result of that, that some guilty people get off or are acquitted? Yes, I do. But I generally come back to the point that I would rather that be the case, than we're convicting people of serious offences that are genuinely not guilty," she said.
"The only thing I can say is that you hope the criminal trial process will enable those genuine cases to be pulled out from those less genuine."
Sexsomnia and other sleepwalking defences should always be robustly challenged in court, according to the CPS guidelines.
But Jade's case never made it to court. Armed with her research, she submitted her appeal, known as a victim's right to review.
A chief crown prosecutor, independent of the CPS department which made the original decision to close the case, reviewed all the evidence again.
He concluded the case should have gone to trial - and that the sleep experts' opinions, and the defendant's account, should have been challenged in court.
A jury would have been "more likely than not" to convict the defendant, he said - one of the tests a case must meet for the CPS to take it to trial.
"I cannot begin to imagine what you have been through and how you feel. I noted during my review the devastating effect of this case on you," he wrote to Jade.
"I apologise unreservedly for this on behalf of the Crown Prosecution Service although I appreciate that is likely to be of little consolation to you."
For Jade, the acknowledgement that her case should have been put to a jury was bittersweet - because the CPS cannot reopen the case.
The defendant was found officially not guilty - and so double jeopardy laws mean he cannot be tried without compelling new evidence.
"There is no hope of any justice for what happened to me," says Jade - but she hopes the CPS will learn lessons to prevent others from going through similar ordeals.
"It's just being let down by a system that's there to protect - and they've openly said they messed up," she says.
In the year to September 2021, just 1.3% of rape cases recorded by police in England and Wales resulted in a suspect being prosecuted, according to Home Office figures.
The CPS say they are "committed to improving every aspect of how life-changing crimes like rape are dealt with and are working closely with the police to transform how they are handled."
Jade is now suing the CPS for damages.
Jade was allowed to record the CPS meeting where she was told there would not be a trial
Police bodycam footage when officers first spoke to Jade