A Swadlincote man who spent more than two years in prison for a rape he did not commit has told of his nightmare ordeal - and his relief after his family cleared him by tracing Facebook messages.

Danny Kay, 26, was jailed for four and a half years in late 2013 following a trial at Derby Crown Court.

Jurors were told a woman had accused him of raping her in 2012, when he was 20. Mr Kay, now 26, had always denied rape and said sex had been consensual.

Finally at a hearing in the Court of Appeal in London in November, Mr Kay challenged the conviction saying Facebook messages had been found which supported his version of events and showed there had been contact after sex.

Three appeal judges agreed that the messages, which were found by his sister-in-law Sarah Maddison, were key evidence and Mr Kay’s conviction was quashed.

In an interview with The Mail of Sunday, Mr Kay, of Swadlincote, said: "Even now, with the conviction quashed, I still can’t believe that it took years of pain and stress for this nightmare to end. And the terrifying thought is that, if the police and justice system could fail me like this, it could happen to anyone.

Young corrupted businessman behind the prison bars
Danny Kay spent more than two years in prison after being wrongly convicted of rape

"Why didn’t the police check my Facebook account when they had my laptop and login details right from the start? Why did it take my sister-in-law to find the evidence? This isn’t some small matter, this is my life and for the police not to do those basic checks is horrendous."

In the interview, Mr Kay said a fellow inmate convinced him the old messages he thought were lost were recoverable.

Mr Kay asked his sister-in-law to log into his account. She said: "I couldn’t believe how easy it was to find the messages. I have just worked in admin all my life and am no social media expert. It only took me a minute to find them so how trained police couldn’t is beyond me."

Mr Kay added: "I had complete trust in the legal system at the time so thought I had nothing to worry about."

He said when he was found guilty "everything fell apart" and he "lost all faith in the system". He spent his first few months at HMP Whatton in Nottinghamshire, Europe’s largest prison for adult male sex offenders.

He added: "Hearing some of the things people have been in for is pretty sick. Some of them are proud of being paedophiles and rapists."

Mr Kay’s barrister Philip Rule, told the Mail on Sunday: "This is an important victory for justice. This is the tip of an iceberg of failings brought about by chronic and long-term under-resourcing of the criminal justice system."

Derbyshire police say they would be reviewing their investigation "to find out whether lessons can be learnt."