Five Afghan teenagers have been arrested after a boy was gang-raped at knifepoint in a forest in Sweden, it has emerged.

The victim, who is under 15, was filmed during the attack, which happened in woodland in Uppsala, south east Sweden.

He was beaten and dragged out to the forest at knifepoint before being subjected to an ordeal lasting more than an hour, prosecutors say.

The victim, who is under 15, was filmed during the attack, which happened in woodland in Uppsala (file picture), south east Sweden

One of the attackers filmed parts of the assault, overnight on October 24 and 25, and posted the footage on social media, it is claimed.

The child, also from Afghanistan, went to police before five suspects were detained on child rape charges, it has been reported in Sweden.

All five have reportedly denied the accusations with one saying he was not present.

Two others say they do not remember what they were doing while the final pair made 'some concessions'.

Court papers say the teenagers, aged 16 and 17, 'inflicted beatings' to the child's head and body before 'grabbing the defendant, covering his mouth and dragging or carrying him into a woodland area'.

At this point, the court papers say, each of the accused carried out serious sexual assaults on the child who was also bitten on the back and spat on.

The boy was beaten and dragged out to the forest at knifepoint before being subjected to an ordeal lasting more than an hour, prosecutors say

All arrived in Sweden as unaccompanied minors seeking asylum and could be deported if convicted.

According to local media, the alleged perpetrators and the victim knew each other but the motive for the attack is not yet known.

Stefan Wallin, a defense lawyer representing one youth, said his client neither admits nor denies the charges.

"He has no recollection of the events because of alcohol intoxication," Wallin told the AP.

Defense lawyers for the others didn't immediately return requests for comment.