STOCKHOLM – Two Afghan migrants and an accomplice have been jailed in Sweden for gang raping a woman and broadcasting the horrific attack on Facebook Live.

Reza Mohammed Ahmadi, 21, was jailed for two years and four months for rape and accessory to rape, while Maysam Afshar, 18, was sentenced to one year in prison for rape.

Both men are Afghan citizens who live in Sweden, where the attack took place. The crime took place earlier this year in Uppsala, a Swedish city not far from the capital Stockholm.

They were given sentences ranging from two years to six months in prison after a largely secret trial. The men have not been named publicly, the Metro reported.

Police were called after social media users saw the stream and raised the alarm. They caught all three men in the act.

The trio tried to claim that the victim – a woman in her 30s – was a willing participant. But their defense was overruled after the court decided she was so drunk and high on drugs she could not have consented.

The Swedish man who filmed the crime was given six months.

Prosecutors initially pushed for the two Afghans to be deported on conviction, but later changed their minds.

The three men were also ordered to pay a total of 335,000 kronor (£29,800) to the victim in damages.