A court in the eastern German city of Chemnitz on Tuesday freed an Iraqi man who had been held as the main suspect in a deadly stabbing that sparked xenophobic mob violence there last month.
Police investigators found no forensic evidence or witnesses to link the 22-year-old asylum seeker, named by media only as Yousif Ibrahim A., to the fatal knife attack, prosecutors said.
Defence lawyer Ulrich Dost-Roxin charged that the arrest warrant and detention order had been illegal, based on "a fantasy of the prosecutor" and "fake evidence" against his client, who had become a "political football".
The court did however keep in custody another suspect, the Syrian Alaa S., 23, over the attack on Daniel Hillig, a 35-year-old German man with Cuban roots, in the early hours of August 26.
Police were still searching with an international arrest warrant for an Iraqi man who was not publicly named.
News of the late-night killing had quickly spread via social media in Chemnitz and sparked protest marches that quickly escalated into racist mob violence.
Hours after the stabbing, mobs of mainly right-wing extremist football hooligans marched through the city and launched random street attacks against people they took to be foreigners, including an Afghan, a Syrian and a Bulgarian man.
A mass rally the next evening drew thousands of far-right protesters, some of whom gave the illegal Hitler salute and clashed with antifascist counter-protesters.
Saxony state, where Chemnitz is located, has been a stronghold of far-right parties and groups that bitterly oppose Chancellor Angela Merkel for her 2015 decision to keep open German borders to a mass influx of migrants and refugees.
The atmosphere was further inflamed when the arrest warrant of Yousif A. was leaked by a prisons officer to extremist groups who then posted it online, spelling out the full names of the suspects, victim, eyewitnesses and the judge.
Security services in the state have come under fire for the alleged sympathies of some officers with movements like the anti-immigration Alternative for Germany (AfD) party and the anti-Islam street movement PEGIDA.