BERLIN - Angela Merkel’s government on Tuesday removed domestic spy chief Hans-Georg Maassen from office, transferring him to a different post to end an explosive row over immigration and the far right that once more rocked the German chancellor’s fragile coalition.

“Mr Maassen will become state secretary in the interior ministry,” Merkel and the leaders of her coalition parties announced in a statement after crisis talks.

The face-saving compromise lets Merkel’s fourth-term government live another day, after her Social Democratic coalition partners had insisted on Maassen’s departure, against the wishes of Interior Minister Horst Seehofer from her Bavarian CSU sister party.

Maassen, 55, became the centre of a heated controversy after he raised doubts about the veracity of reports of far-right hooligans and neo-Nazis randomly attacking immigrants in the eastern city of Chemnitz in late August.

In his senior new role, essentially a promotion, Maassen will not be responsible for overseeing the BfV intelligence service, the party leaders stressed in their statement. It was not immediately clear who will replace Maassen as head of the BfV office.

The far-right attacks in Chemnitz, which caused revulsion in Germany, were triggered by the fatal stabbing of a German man over which police are holding a Syrian suspect and searching for an Iraqi man. A court freed another initial Iraqi suspect on Tuesday.

Days after the unrest, Maassen questioned the authenticity of amateur video footage showing street violence and voiced doubt that racists had “hunted down” foreigners - comments that directly contradicted Merkel, who had deplored the xenophobic attacks and “hatred in the streets”.

SPD leaders - as well as the opposition Greens, Free Democrats and Linke parties - had demanded the resignation or sacking of the spy chief for political meddling, and pointed to his repeated meetings with leaders of the anti-immigration Alternative for Germany (AfD) party.

Leading opposition figures were scathing about the government’s response to the Maassen dilemma.

“That he has in practice been promoted and that the SPD supports this, is a farce,” fumed Dietmar Bartsch, the parliamentary head of the far-left Die Linke.

Greens co-leader Katrin Goering-Eckardt tweeted that anyone who rewarded instead of punished Maassen for “cosying up to the AfD” had “lost all sense of decency”.

Whatever Maassen’s true political leanings, the issue has turned him into a martyr of Merkel haters and the far right. “Merkel has moved another critic out of the way,” the AfD’s Alice Weidel said.

Deep chasms

Maassen rejected accusations that he had supported AfD lawmakers with early access to unpublished data and advice on how to avoid surveillance by his Federal Office for the Protection of the Constitution (BfV).

Social Democrat leader Andrea Nahles had charged that Maassen had “provided material for right-wing conspiracy theorists”.

However, Maassen had the backing of his immediate boss, the CSU’s hardline Interior Minister Seehofer, who has for three years been Merkel’s nemesis within the ruling grand coalition.

Seehofer, a harsh critic of Merkel’s 2015 decision to allow a mass influx of migrants and refugees, had in July brought the government to the brink of collapse with his threat to shutter national borders to asylum seekers.

With that bitter dispute barely papered over, the conflict over Maassen’s fate once more highlighted the deep chasms within Merkel’s coalition.

On one level, both major parties, the CDU and SPD, are distrustful partners stuck in a political marriage of convenience after the AfD, a one-time fringe party, poached millions of their voters in last year’s elections.

But the rift is deepest between Merkel and Seehofer, whose own political future hangs in the balance as his CSU braces for potentially massive losses to the AfD in Bavarian state elections next month.

Seehofer recently labelled the migration issue “the mother of all problems” in German politics - a comment read by many as a veiled reference to Merkel’s nickname “Mutti”, or Mummy.

The conservative Die Welt newspaper described Maassen’s transfer - which comes with a bigger pay check - as “a Solomonic solution” that allows Merkel and Seehofer to turn the page on yet another row.

“The coalition can continue. Maybe one day it will even govern,” wrote Die Welt commentator Torsten Krauel.