A criminal migrant has won an appeal arguing that being sent back to Eritrea would jeopardize his mental health Anicet Mayela, a Congolese migrant who later pled guilty to child rape, protests outside a detention center near Oxford, England, in June 2005. © Simon Evans/PA Images via Getty Images

An Eritrean migrant in the UK who was convicted a decade ago of raping a teenage girl has been spared deportation after convincing a court that being sent back to his home country would damage his mental health.

The child sex offender, whose identity has been kept secret by the UK government, won his legal appeal after arguing that he wouldn’t get treatment for depression and post-traumatic stress disorder if he were deported to Eritrea. Lawyers for the man also argued that he would likely be punished in his native country for evading compulsory military service, and he might commit suicide, according to local media reports.

The migrant was due to be deported after completing his prison term under a 2014 order. He was granted a reprieve despite a government security report finding that he would pose a “medium” risk to public safety if he were allowed to live freely in Britain.

Afghan suspected of raping & murdering 13yo to be moved from UK to Austria Afghan suspected of raping & murdering 13yo to be moved from UK to Austria

“This man committed a serious criminal offense and should be nowhere near this country,” MP Nigel Mills told the Sun newspaper. “If he was concerned about losing mental health treatment or being arrested for fleeing the draft, he should have thought about that before he committed the crime.”

The lawmaker argued that the Eritrean’s case is emblematic of a larger problem with the UK’s tribunal system, which he called “deeply out of touch with the rest of Britain.”

A judge ruled last year that an illegal migrant from Gambia who attacked a woman in Scotland couldn’t be deported because he might not be given proper medical treatment back in West Africa. In another recent case, an Afghan migrant convicted of intentionally exposing his penis in public was granted refugee status in the UK after lawyers successfully argued that such behavior would “put him at high risk of physical violence” in his home nation.

Anicet Mayela, an illegal Congolese migrant whose deportation was blocked by an airline cabin crew, pled guilty last week to raping a 15-year-old girl in Oxford, England. Mayela was reportedly a “poster boy” for anti-deportation activists and demonstrated outside a detention center wearing a sign saying, “Migrants are not criminals.”