More than 300 rapes were reported in UK schools within a three-year period, new figures reveal.

Data released to The Independent in response to a Freedom of Information Act request found that a total of 2,865 sex crimes were reported between 2011 and 2013, representing a 40% increase.

The statistics, released by 37 out of 46 UK police forces, revealed that more than 90% of the alleged abuse victims were children.

More than half of the offenders were young people, with one case involving a 12-year-old girl from a school in Hampshire who was "stripped naked and raped by fellow pupils".

In another incident, the girl said she was taken into the woods and assaulted. A police enquiry was launched after the pupil and another 15-year-old girl reported the abuse.

However, the girls were excluded by the school, which said they had consented to sex and broke school rules. The Crown Prosecution Service said in May that there was insufficient evidence and no charges were brought against the suspects.

NSPCC: Online porn causing rapes

Police launched a fresh enquiry in March 2013, and a spokesman for the school subsequently apologised to the girls' families, saying it "deeply regrets" that it failed its pupils.

Children's charity NSPCC said easy access to online pornography could play a role in the increase in incidents of sexual abuse.

The NSPCC's Claire Lilley told The Independent: "Schools must make sure they have adequate safeguarding procedures in place and that parents and teachers are able to recognise warning signs early so they can take swift action when required."

Yvette Cooper, the shadow home secretary, said: "These figures are very disturbing. Schools should be a place of safety for children and young people. The government needs to take action given the evidence of growing sexual violence amongst young people."

A Department for Education spokesperson added that any allegation of abuse must be taken seriously by schools, and maintained that the safeguarding arrangements put in place by educational establishments are regularly inspected.