A 27-year-old Lebanese migrant is set to be released from prison in Berlin despite not only being a known radical Islamist but also threatening to carry out terror attacks once he gets out.

The man, who is classified as a dangerous Islamist, is approaching the end of a three and a half year term for robbery and now police say they will have to extensively monitor him upon release because he has threatened to carry out terror attacks. An official statement from the Berlin authorities says the Islamic radical will “use every opportunity for an attack on unbelievers after detention,” Die Welt reports.

Authorities suggest the 27-year-old was radicalised while serving his sentence, and already had a violent personality which made him “a threat to internal security in Germany and the people around him.”

His violent personality was made clear after police entered his cell last month and he viciously attacked them. He was given a further six-month term in prison for assaulting the officers.

The warning comes from data gathered from the man’s mobile phone last year, which showed he was in close contact to violent Islamists across Germany. He is also said to have written that “unbelievers” should be punished.

The German government have attempted to deport the man back to Lebanon but have been unsuccessful because he has no documentation. A government delegation attempted to travel to his home town of Sidon and obtain new papers, but the local authorities refused to issue them.

The man will likely be released in the coming months and police have already developed a plan to monitor him around the clock. He will not be allowed to use smartphones or computers or have any internet access. He will also be forced to wear an ankle monitor and report to a local police branch every day.

Radicalisation in prisons is becoming a real problem across many European countries with high Muslim populations. In France, some have described certain prisons as “terrorist universities.”

Many UK many prisons have seen a rise in Islamic radicalism as well. Ian Acheson, who was commissioned to examine Islamic radicalism in UK prisons, said earlier this year: “Prison is an ideal environment for the death cult ideology of Islamist extremism to flourish.”

Mr Acheson noted that staff in prisons did little to counter the radical Islamists “for fear of being accused of being racist by Muslim prisoners.”