The Federal Court in Lausanne ruled that the Iraqi national should be released after completing two-thirds of his term for planning terror attacks, according to reports in the Sunday papers.
The federal police, Fedpol, had sought the deportation of the Iraqi who belonged to an IS cell in the canton of Schaffhausen.
The man – considered dangerous by police – was convicted along with two compatriots in March and handed a three and a half year term.
Since he had been in pre-trial detention since 2014 he was eligible for release on good behaviour grounds in July.
The Iraqi, who entered Switzerland as a refugee, was initially placed in detention awaiting deportation but appealed. A federal judge granted his appeal and ordered his release last Wednesday.
The Federal Court said there was no legal basis to deport the convicted criminal to Iraq where his life would be in danger. Its decision means he is now at liberty.
According to the Sonntags Zeitung, Fedpol was surprised at the decision. It considers the man “still constitutes a danger to internal and external security”.
The two other Iraqis who were sentenced alongside him in March for supporting IS and planning a bomb attack are still in prison.