Two men have been detained on suspicion of raping a woman in Sweden and livestreaming the harrowing attack on Facebook while a third was held on suspicion of failing to report the rape.

The alleged assault took place in a flat in the town of Uppsala, north of Stockholm on Saturday (21 January).

A 20-year-old man and an 18-year-old man, who are both reportedly from Afghanistan, were arrested in the city at the weekend after police were tipped off by social media users.

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

According to The Local, the men have denied the allegations. 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."

Andreas Welin, the lawyer for the 24-year-old accused of failing to report the case, added: "I have seen stronger evidence in my days."

The three suspects have not been charged. According to Swedish law they cannot be identified but can be held without charges if there is a risk they may flee.

Earlier this week investigators appealed to social media users who had witnessed the attack to turn over any images from the assault to the 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. "

Facebook social media network
Three men have been detained in connection with a gang rape that was live-streamed on Facebook Reuters

One witness, who unwittingly watched the incident, described their horror at seeing the attack on the woman on the social media site. "At first I thought it was a poorly orchestrated joke. The first thing you think is: 'How can you do such a thing to a girl? And how can you do it live?' It is totally sick."

The film has been removed from Facebook but has been circulated on the internet Mail Online reports. The 30-year-old victim has been receiving treatment in hospital.