At midnight on 28 November last year, Sarah made the phone call she says she thought would save her life. After nine years of abuse from a man she describes as so controlling that she wasn't allowed her own purse, let alone bank card or driving licence, she had finally been pushed over the edge.

Minutes earlier, as she tells the story, she had been held down and savagely raped by her husband, Ray, again. When he went downstairs to have a cigarette, she dialled 999 and whispered to the operator what had happened. Waiting for the police to arrive, she feared Ray would kill her, but when the officers came and eventually found him hiding in woods nearby, she thought the worst was over and she would finally be safe. Ray would go to jail and she could make a new life for herself and their children.

But on 5 November, almost exactly a year later, she was the one in the dock, being told by a judge that she was going to prison. And as she made her way in a van from Mold crown court in north Wales to start an eight-month sentence at Styal prison in Cheshire, Ray was waiting at the school gates to pick up the children. Ray pleaded not guilty to the rape charges and the Crown Prosecution Service subsequently decided to discontinue proceedings against him.

On Tuesday, Sarah was released on appeal, on the orders of the lord chief justice, Lord Judge, the most senior member of the judiciary in England and Wales. There should be, said Judge, "a broad measure of compassion for a woman who had already been victimised". She had served 18 days.

Sarah had been convicted of perverting the course of justice after retracting what Judge said was a "truthful" allegation that Ray had raped her six times. To many people, a rape retraction would be a clear sign of a damaged woman under pressure from a manipulative partner. But to the CPS, Sarah was perverting the course of justice.

On Thursday night, she sat down and spoke to the Guardian for two hours from her older sister's house in Powys, mid-Wales. Judge had ordered her not to return to her own home, occupied by Ray and the children she hasn't spoken to since 5 November, when she told them she was going for some Christmas shopping; in reality she was heading to court to hear her sentence.

"Leaving those kids that morning was the most heart-wrenching thing I've had to do in all my life," said Sarah. "I remember kissing my eldest before they went to school and I wanted to kiss the youngest before they went to nursery, but I couldn't, I had to get in the car. I didn't want them to see me upset."

Sarah is 28, but she looks 10 years older after spending, as she describes it, almost all of her adult life submitting to the wishes of a man who terrifies her. She picks her words carefully, apologising when she can feel tears coming, continually calling herself "stupid" and "foolish" for mistakes she says she has made. Her voice does not waver as she details years of abuse, but she avoids eye contact, staring straight ahead with dull eyes as she calmly details "a year of hell".

At 11:30am last Tuesday, Sarah was working in Styal's prison garden when a guard told her that her barrister was on the phone.

"I was a little bit excited, thinking that the judge in London would maybe actually see what I had been through and see it for what it was and decide not to punish me any more," she said. "I felt personally that I had been let down seriously." When the lord chief justice's judgment came though shortly after noon, her happiness was tempered with anger.

"Don't get me wrong," she said, "I'm glad the judge let me out of Styal. But I haven't been let out without a punishment and yet I shouldn't have been punished at all."

When Judge quashed her custodial sentence, he replaced it with a community sentence and a supervision order for two years. Though she is now free, she has a criminal record.

A spokesperson for the CPS said: "Prosecutors are acutely aware of the difficulties some complainants face in reporting rape and supporting a prosecution. We recognise the sensitive and complex issues around domestic abuse and sexual violence. Decisions to prosecute women who report rape are taken only after very careful consideration of the evidence and public interest requirements and are never taken lightly.

"We will carefully consider the court of appeal's judgement, and particularly any comments that relate to our conduct of the case, with a view to determining any action that is required."

A police spokesperson said: "Dyfed-Powys police, in line with national requirements, treat, and will continue to treat, all allegations of sexual assaults seriously. The officers involved in the case would be happy to discuss and address any concerns the victim has directly between each other."

Ray, meanwhile, is holed up in the matrimonial home, refusing pleas from Sarah's family to stick to a plan agreed in conjunction with a liaison officer from Barnardo's before she was sentenced. This formal but not legally binding agreement stipulated that her sister would care for the children in the event that Sarah was sent down.

Ever since she went to the police to allege rape last year, the children had lived with Sarah in the family home, but Ray was allowed to see them regularly with agreement. But it was allowing him this contact which, Sarah believes, was her downfall. "He used them to get me," she said.

Ray was not afraid to draw the children into the most harrowing scenes. "After he raped me, before I called 999, I was sitting by the side of the bed in tears, and he went and woke up our oldest child, pulled them into the bedroom and said, 'Look at the state of your mother. She's called the police and the police are going to come and take daddy away'," said Sarah.

When the police did come and take Ray away, the confused children, dressed in pyjamas and their dressing gowns, were bundled into the back of a police car and taken to a friend's house. Sarah was taken to a sexual assault referral centre in Shrewsbury, where she was photographed, forensically examined and interviewed on video.

Initially, she says, the police were very good. Charges were swiftly brought against Ray, and he was remanded in custody. It was while he was on remand that Sarah believes the first key mistake was made: he was allowed to write emotional letters to the children, telling them what a "horrible" place prison was.

"At Styal prison and, I assume, every prison, they have to read all the letters that go out and all the letters that come in," said Sarah. "So if those letters had been checked by the proper people, they should have known why he was in there and looked at the address where the incident happened and looked at the address where the letters were being sent and quite obviously seen what was going on there. There were, I think, four letters that came through the children. It wasn't just one that slipped through the net."

After three weeks on remand, Ray was let out on bail, just in time for Christmas.

His bail conditions stipulated that he should have no contact with Sarah nor visit the matrimonial home. But before long, he was calling and texting, asking her to bring the children round to his mother's house to see him. "He asked me to come because he had hurt his hand and he couldn't pick up the youngest," said Sarah.

"He said he had no support from his family, that none of them were about and I wanted to help so I very foolishly took the kids down. But it was quite obvious, as soon as I had set foot in that house, that he didn't want to see the kids, that it was me he wanted to see.

"At one stage he wanted to give me a hug; he started crying and saying sorry for what he had done to me."

And so, said Sarah, he wangled his way back. "It was the usual thing: 'I'm so sorry, I promise I won't hurt you again.' Every time I get sucked back in. I wasn't strong enough. I was in a very vulnerable state. He said how horrible prison was.

"He was telling me about drug dealers coming off their drugs and cutting their arms and there being blood all over the cells, horrible things like that, which made me, even though it wasn't my fault he had raped me, it made me feel in a way guilty because I had rung 999 and I had put him there."

She continued. "He told me he didn't want to go back there and he had been told by his solicitor that he was looking at a lot of years. And that's when the first slip happened, when he said I was going to have to go to the police station and tell them I didn't want to take it any further.

"So I rang the CID police officer who had dealt with my case, and he said: 'From the moment you dialled 999 to just before Ray got bail, you were doing everything we asked you to. And from the moment he got bail, he got to you.'

But if they had an inkling that he was getting to me you would have thought, surely to god, that they would have stepped up the emotional support. But there was no extra support, no nothing."

There were numerous warning signs for the police that Ray was controlling her, she says. "I remember one time [after she had been charged with perverting the course of justice] a police officer said to me, 'So where's your purse, where's your bank cards?' and I said, 'He's got them all'. He asked why and I said, 'Because he keeps everything'. I wasn't allowed to go anywhere on my own. Ray had to take me. I didn't have my own handbag, my own wallet – nothing.

"I remember once wanting to get my driving licence, and my dad said to Ray, 'she needs to get her licence, it would be so much easier so she could come and go and you wouldn't have to take her to all these places.' And he swung round to my dad and said: 'Yeah, but if she gets her licence I won't know where she is.'"

Though Sarah told the police she wanted to drop the charges in January last year, the CPS said they were continuing with the case against Ray. Then came an "out of the blue" visit from Ray's sister, Janine, who told Sarah it would be "very helpful" if she were to not only drop the charges but confess to "making it all up".

By this point, Ray and Sarah's relationship was "half back on" – "for the sake of the children" says Sarah – and they had had consensual sex over the Christmas period. Janine handed Sarah the phone and she called the police. She said she had been lying and that he hadn't raped her. When they told her she would have to make a formal statement, the sister drove her to the police station.

No one really believed the rapes had been a fiction of her imagination, she says. "It was horrible because I knew the police officers and the solicitors believed that the rapes did happen but the CPS wanted to prosecute me for perverting the course of justice.

"It was unbelievable. I remember going in and seeing my solicitor and finding out what course of action they were going to take and I was in tears coming out of the police station.

"I still can't get my head around the fact that the police officers and my solicitor knew damn well I had been raped and even when I rang the main CID person and said the rapes did happen as I had originally said, he said: 'I just thought it was only a matter of time before you came to me and said yes, they did happen.' Still to this day I can't get my head around it."

She wishes that she had stood her ground after plucking up the courage to call 999.

"I regret greatly not staying stronger and going through with the trial in May. I really do, even to this day. It upsets me a great deal that after that horrific ordeal, he's got away with it. It does worry me greatly. I feel sorry for the next woman that he meets. I hope they see him for what he really is because I don't want them to have to go through what I did," she said.

When asked what she wants from the future, it is clear her own ambitions are modest: "I want to get my kids back and get my house back and get my life back. To start to live again. I used to be a very independent person but I've got no confidence left. I've got to rebuild all that.

"I just want to be happy. At the end of the day, that's all I want. Am I really asking too much?"

The names Sarah, Ray and Janine are pseudonyms