The UK is facing a crisis as tens of thousands of schoolchildren have been caught sexting in recent years.

An investigation by The Times, which described the issue as a “sexting crisis”, led former Minister Maria Miller, as well as child protection groups, to call for compulsory sex and relationships education.

According to the report, children aged 12 and 13 were involved in more than a third of the cases.

Mrs Miller, who now chairs the women and equalities select committee, said sexting was having an “appalling” effect on young people.

She said: “There has been historically a very negative attitude to making sex education compulsory from the government, but I think the tide is turning.”

“I have changed my position on it. I used to think it should be schools who decide what’s appropriate but the way the internet is impacting on young people’s lives — and particularly young girls — leaves them in need of far greater support. We have to make sure that we have teachers and organisations who are specialists in these areas to be able to tackle it properly.”

Mrs Miller went on to encourage Nicky Morgan, the Education Secretary and Minister for Women and Equalities to make it compulsory for schools to report sexting to or by under-18s to police.

Out of 50 schools asked, since 2012, more than 1,218 pupils had sent or received sexts including sexual or indecent images of minors. Fifteen had no way of recording sexting cases at all.

The imagery was sent by phone, webcam, digital camera or uploaded online.

One tenth of the cases involved a “non-school adult”, dispelling the idea that the sexting happened just between young people.

Scaled up, nearly 45,000 pupils nationally would have been caught sexting in the past three years.

The Government ha rejected calls to make sex and relationships education compulsory for all schools.

Mrs Morgan told the Times: “Schools have a responsibility to make sure children know how to stay safe online and when using technology and social media.

“Good schools are already doing this well, and building on their work we’re asking all schools to put in place stronger measures protecting children from harm online.”

“Personal, social, health and economic education should be on every curriculum as it is at the front line of child protection,” an NSPCC spokesman said.

“Sexting needs to be covered so that young people feel more able to approach trusted adults and get the support that they need.”