Three teenage boys took turns raping a 12-year-old girl, filmed the assault with a mobile phone camera and showed the video to classmates, Austrian authorities said Friday.

Police said the rape happened after a birthday party in Freistadt in the province of Upper Austria, and that the girl was assaulted after she became intoxicated and fell asleep. It was not immediately clear when the crime occurred.

Investigators detained the three boys, ages 13, 15, and 16, after they showed a clip of the rape to classmates at school and a student who saw it alerted authorities, police said.

The two older suspects would be formally charged in juvenile court with sexual abuse, officials said. They said the youngest could not be held criminally responsible.