Swedish detectives are investigating allegations that a woman was gang-raped in an attack that was broadcast on Facebook Live.

A witness who watched the incident online 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.

The Swedish newspaper Aftonbladet said the assault took place in a flat in the town of Uppsala, north of Stockholm, on Saturday night and three people had been arrested.

Three men were arrested in Uppsala (pictured) in Sweden after the incident on Saturday night

Police were alerted by Josefine Lundgren, 21, who looked on in horror as she watched the live stream on a closed Facebook group.

She told Sweden's Expressen newspaper: 'He pulled her clothes off and lay on top of her.'

Ms Lundgren said she saw uniformed police arrive at the scene and arrest the culprits.

Another online witness told the paper: 'At first I thought it was a poorly orchestrated joke.'

He said: '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 incident will be more bad publicity for Facebook Live, following the online torture of a man with learning difficulties in Chicago earlier this month

The apartment is being examined by forensic scientists, three men are being questioned and the woman is thought to be recovering in hospital.

In June last year gang member Antonio Perkins, 28, unwittingly live streamed his own death on Facebook after he was shot dead in Chicago while using the real time video app.

And earlier this month four black people were charged with a hate crime after a white man with learning difficulties was tortured on Facebook Live. The gang shouted: 'F*** Trump' and 'F*** white people' during the attack, also in Chicago.