BERLIN (Reuters) - A German court on Tuesday released an Iraqi asylum seeker detained last month over the fatal stabbing of a Cuban-German man that set off violent protests by far-right radicals, his lawyer and a prosecutor said.

A Syrian man who was also detained over the stabbing of the man remains in custody, the prosecutor said.

A third suspect is still on the run and prosecutors think he and the Syrian were involved in killing the 35-year-old carpenter, in the eastern city of Chemnitz, the prosecutor said.

The Iraqi’s lawyer complained about his client’s detention.

“Today’s revocation of the arrest warrant was long overdue,” lawyer Ulrich Dost-Roxin wrote in a post on his website. “My client Yousif A. has had to spend more than three weeks in remand without any concrete suspicion.”

He and the Syrian had been named as the main suspects in the killing, which sparked violent xenophobic protests and led to a scandal centered on Germany’s domestic spy chief, whose fate is being contested in a tug-of-war at the highest levels of government.

Chancellor Angela Merkel and coalition leaders meet on Tuesday to decide the future of Hans-Georg Maassen, head of the BfV domestic intelligence agency, after he questioned the authenticity of video footage of far-right protesters chasing migrants in the streets of Chemnitz.

The center-left Social Democrats - junior partner in Merkel’s coalition government - want him to go, but Maassen has support from Merkel’s Bavarian partners. Whichever way Merkel leans, it could create trouble within her government.

The Maassen row has exposed deep divisions in German society over Merkel’s 2015 decision to open the country’s borders to refugees fleeing wars in Syria and elsewhere. More than one million have come since then.

Their arrival has fueled support for far-right groups such as PEGIDA and the Alternative for Germany (AfD), which is now the main opposition party in parliament.