A Swedish judge has refused to deport two Eritrean migrants convicted of aggravated rape because they are military deserters and will face punishment if they are sent back.

The men, aged 30 and 32, were convicted in a Stockholm court this week of raping the woman for hours in an apartment in the city while threatening her with a knife.

The pair were sentenced to five years in jail and ordered to pay the victim £11,000 each, and prosecutors also requested they be deported for a minimum of 15 years.

Two Eritrean refugees, aged 30 and 32, have been sentenced to five years and a £11,000 fine each after threatening a woman with a knife and raping her for hours in a Stockholm apartment

But the court ruled against it after a migration board warned they would face obstacles over human rights concerns.

The pair have been living in Sweden for several years and have been granted refugee status by the government, according to local news site Aftonbladet.

The migration board found that both men were military deserters who had left Eritrea illegally.

If returned, the UN warns that deserters face arbitrary detention, extrajudicial punishment and conscription that amounts to forced labour.

Judges at Stockholm District Court ruled the men will not be deported because they will likely face punishment in their home country as military deserters

Eritrea also has a long-standing shoot-to-kill policy against those found fleeing the country illegally.

The European Court of Justice recently ruled that EU member states cannot deport refugees provided they can prove there is a threat to life if they return home.

One of the men also has family living in Sweden, which is often used as an argument against deportation in such cases.

Prosecutors had argued that the men do not have consistent work and had only learned basic Swedish as part of their case.

Lawyers have not yet said whether they will appeal the decision.