Two young Muslim migrants who raped a woman in Sweden and livestreamed the attack on Facebook have been remanded in custody.

A 20-year-old Afghan national and an 18-year-old, also from Afghanistan, were arrested in the city of Uppsala at the weekend after police were tipped off by social media users.

A 24-year-old Swedish man has been detained on suspicion of failing to reveal rape.

The three, who cannot be identified under Swedish law, have not been charged. In Sweden a person suspected of a serious crime can be detained without being charged with the approval of a court if there is a risk they will flee the country.

The Local said the men denied the allegations and reported that Christer Söderberg, a lawyer representing the 20-year-old, said: ‘A woman is said to have been raped in an apartment. He is suspected of that.

‘He denies any criminal offence, he has given in my opinion a perfectly coherent story about what happened. I cannot go into details, but he has told me in a way that is not contradicted by anything else.’

The 24-year-old’s lawyer, Andreas Welin, said: ‘I have seen stronger evidence in my days.’

Earlier this week investigators appealed to social media users who had images of the attack to turn them over to police.

Uppsala deputy chief prosecutor Magnus Berggren said: ‘We have some picture and video material. But we don’t have any images showing the attack itself’.

The film has been removed from Facebook but it has been circulated on the internet.

Swedish media have published excerpts of the footage, showing at least one of the Muslims holding a revolver.

The migrants were arrested early on Sunday in an apartment in Uppsala, 45 miles north of Stockholm, in the presence of their 30-year-old victim.

The arrest were made after members of a Facebook group saw the attack streamed live and alerted police.

Josefine Lundgren, 21, was one of the witnesses who watched the incident online and reported it.

She said she saw the victim being stripped and then sexually assaulted by several armed men and said the attack only ended several hours later when police arrived and switched off the webcam.