BERLIN (Reuters) - Germany’s highest court on Tuesday halted the deportation of a Turkish citizen convicted of supporting an Islamist militant organization, saying authorities should first ensure he wouldn’t face torture or inhumane prison conditions in Turkey.

The Federal Constitutional Court overturned a ruling by a lower court that ordered the deportation of the man, who was born and raised in Germany, after he was convicted of traveling to Syria and supporting a “terrorist organization”.

Nearly a thousand people are believed to have left Germany to fight with Islamist militants. Some are now returning as the jihadist group’s presence in the Middle East crumbles.

The court ruling said the 30 year-old man, who was not identified by name, went to Syria with his wife and children in 2013 where he supported an Islamist militia group, After his return to Germany, he transferred money to an account related to Islamic State, it said.

He was initially sentenced to three years and six months in prison in Germany in 2015, but immigration authorities ordered his immediate deportation to Turkey.

The high court called for checks.

“It is constitutionally necessary for responsible authorities and courts to be informed about the conditions in a destination country before a deportation,” the court said.

Germany is home to around three million people of Turkish descent, some of who have German citizenship, while others only hold Turkish passports.

A growing number of Turks have sought asylum in Germany since the 2016 failed military coup in Turkey.