A German court has ruled that municipalities must accept migrants convicted of sex offences who have been sent to them even if they are at risk of reoffending.

The case was brought by the Hassloch municipality in the Bad Dürkheim district in Rhineland-Palatinate after 20,000 citizens signed a petition to prevent the relocation of a failed asylum seeker who had served three years in prison for sex offences.

The Higher Administrative Court of Rhineland-Palatinate in Koblenz rejected the petition saying that the relocation did not break any laws, broadcaster NTV reports.

Residents were particularly concerned as the migrant is under strict supervision and is part of a special monitoring programme for criminals who are likely to re-offend. A psychiatrist in the man’s case also recommended that the migrant take medication to control his psychosis.

Due to the fact that the migrant was rejected for asylum, the Bad Dürkheim district government is unable to house him in an asylum home.

A judge in the case has ordered a further psychiatric evaluation to determine whether the migrant presents a danger to the public in Hassloch.

While neighbouring Austria has promised to deport asylum seekers who commit serious crimes, the German deportation system has been sluggish to deport any failed asylum seekers or illegal immigrants.

Leader of the Bavarian Christian Social Union Horst Seehofer has called large-scale deportations “almost impossible” while left-wing parties have actively attempted to block the federal government’s deportation plans.

As a result, many failed asylum seekers, some of them with criminal records, have been allowed to roam free in Germany. In some cases, the “tolerated” migrants have even gone on to commit serious crimes.

Asylum Seeker Shot by Police After Stabbing Five-Year-Old to Death https://t.co/ZVMQghA03t — Breitbart London (@BreitbartLondon) June 6, 2017

One failed asylum seeker was shot by police earlier this year after killing a five-year-old boy at an asylum home in Bavaria.

It was later revealed that the Afghan national was a failed asylum seeker who had been found guilty of attempted murder by arson but was allowed to stay in the country because he claimed to have converted to Christianity and repatriating him could result in the Afghan receiving the death penalty for apostasy.