A schoolboy has been cleared of rape after lawyers discovered that police had missed key evidence proving his innocence.

It comes amid a growing scandal over disclosure failures by the Crown Prosecution Service that have seen more than a dozen sex cases collapse in recent months.

It likely means that innocent men were wrongly accused, but also that dangerous criminals may have escaped justice because of blunders by police and the CPS.

The 17-year-old boy was found not guilty after the emergence of thousands of social media messages proving his innocence that police officers had failed to uncover.

He was expelled from his school in Leicestershire in 2016 following his arrest at the age of 15, according to The Times.

After the messages emerged, the prosecution offered no evidence - with not guilty verdicts entered for 14 charges against him including rape and sexual activity with a child.

In the latest example, a 17-year-old boy was found not guilty after police officers failed to uncover thousands of social media messages proving his innocence (stock photo)

It came after defence lawyers found more than 200 pages of Facebook messages proving his relationship with a girl of the same age was consensual.

A spokesman for the CPS said: "We have a duty to keep cases under continual review.

"In March 2017, as part of the charging decision, the CPS requested that police investigated social media interactions, but were informed that no messages existed.

"As a result of new material made available to the CPS in November 2017, further reviews of the case were undertaken."

Last month, prosecutors admitted that 13 rape trials collapsed last year because they failed to disclose vital evidence that undermined the case against the defendants.

The total doesn't include four rape trials which had to be abandoned in the past month at the last minute.

In January, Oxford University student Oliver Mears had a rape charge against him dropped after being on bail for two years, because of a diary discovered on the eve of his trial.

The embarrassing revelation by the CPS has put fresh pressure on Director of Public Prosecutions Alison Saunders, who has insisted no one is wrongly behind bars because of disclosure failures.

The embarrassing revelation by the CPS has put fresh pressure on Director of Public Prosecutions Alison Saunders (pictured)

The true scale of the problem was quietly slipped out in the House of Lords last month.

Former Attorney-General Lord Morris asked how many rape trials had been discontinued because of a failure to disclose evidence.

In reply, Lord Keen, the Ministry of Justice's spokesman in the Lords, said: 'Internal CPS case outcome recording data for 2016-17 shows that issues connected to the disclosure of unused material were recorded as the primary reason for two per cent of the rape prosecutions that were subsequently not proceeded with after charge.'

A spokesman for the CPS said: 'The two per cent represents 13 rape cases that were not proceeded with in 2016/17 after being charged due to a failure to disclose unused material.'

He added: 'This represents 0.3 per cent of the 5,190 rape cases we prosecuted in 2016-17.'

During a parliamentary debate last week, former Lord Chief Justice Lord Thomas said: 'We can no longer continue this failure of accountability.

'It is a disgrace – I do not use that word lightly – that this problem has been left unresolved for so long.'

The 13 cases dropped last year included those of four agricultural students wrongly accused of gang-raping a woman at a college ball.

In January, Oxford University student Oliver Mears (pictured) had a rape charge against him dropped after being on bail for two years, because of a diary discovered on the eve of his trial

Te young men endured two years of 'being dragged through hell' because the detective in the case had failed to disclose what the judge called 'game-changing' evidence that undermined their accuser's claims.

The CPS said: 'The CPS accepts that we, along with police colleagues, need to do more to improve our disclosure of unused material. There are systemic disclosure issues across the criminal justice system, and it will take a collective effort from all participants for improvements to be made.'

Critics say DPP Mrs Saunders has still not got a grip on the problem, after she declared that police did not always have to look for evidence on social media or mobile phones.

'We don't ordinarily trawl through people's lives,' she said.

'If people have known each other for a day, you might look at the texts between each other on that day or perhaps a day after.

'But you wouldn't and couldn't, without a huge amount of resources, completely download a phone and trawl through it all.'

Former Chief Crown Prosecutor for the North West Nazir Afzal, said: 'We wouldn't be saying that about looking for witnesses or DNA or fingerprints. We've got to do it, that's how we ensure a fair trial.'

He added that the DPP had been 'very bold' to claim that no one was currently wrongly in jail because of a failure to disclose evidence.

'I know of cases where digital evidence would have perhaps meant that person wasn't convicted, and with 84,000 people in prison it's a bold statement to say that not one of them shouldn't be where they are.'