BERLIN (Reuters) - Germany’s government said on Tuesday it would replace the head of its domestic intelligence agency who has faced accusations of harboring far-right sympathies, putting an end to a row that exposed divisions in Chancellor Angela Merkel’s government.

Hans-Georg Maassen, who had questioned the authenticity of video footage showing far-right radicals hounding migrants in the eastern German city of Chemnitz, will become a senior official at the interior ministry once he leaves the BfV agency, the government said in a statement.

The center-left Social Democrats (SPD), junior coalition partners of Merkel’s conservative bloc, had wanted Maassen removed from the post he has held since 2012.

Horst Seehofer, leader of the Bavarian Christian Social Union (CSU), the sister party of Merkel’s Christian Democrats (CDU), had stood behind Maassen.

“Interior Minister Horst Seehofer values (Maassen’s) competence on questions of public security,” the government statement said. “Mr Maassen will not be in charge of supervising the BfV at the ministry.”

The deal allows each of the three parties to claim it got what it wanted. But opposition parties were quick to denounce the deal as a face-saving measure that effectively amounted to a promotion for Maassen.

Leftist lawmakers have accused Seehofer of undermining the credibility of the BfV agency by refusing to fire Maassen.

Slideshow ( 3 images )

‘IT’S A FARCE’

They also accuse Seehofer of being reluctant to act for fear of strengthening the far-right Alternative for Germany (AfD) party, which has also stood behind Maassen and is expected to steal conservative voters from the CSU in a regional election next month in Bavaria.

“Maassen is no longer the top spy. This is good. But it is a farce that he is practically being promoted and that the SPD is going along with this,” said Dietmar Bartsch of the hard-left Die Linke party.

SPD leader Andrea Nahles faced a backlash from members of her party furious at the decision to retain Maassen as a senior civil servant.

“The so-called agreement on Maassen is a joke,” Florian Post, an SPD lawmaker in the Bavarian regional assembly, told the RND newspaper group. “Either the man is fit to hold high office or he isn’t.”

Maassen’s comments on the video pictures contradicted Merkel’s own assessment. She said they “very clearly revealed hate” which could not be tolerated.

Slideshow ( 3 images )

The far-right violence, the worst seen in Germany in decades, followed the fatal stabbing of a German man that was blamed on two migrants. Earlier on Tuesday a German court released one of the men, an Iraqi, though a Syrian man remains in custody and a third suspect is being sought.

Merkel has been criticized for taking 11 days to act on Maassen, whose comments on the far-right violence in Chemnitz during an interview with mass-selling Bild newspaper on Sept. 7 triggered the row.

The violence in Chemnitz exposed deep divisions in Germany over Merkel’s 2015 decision to open the country’s doors to around a million people seeking asylum, mainly Muslims from Syria, Iraq and Afghanistan.

That decision has also been blamed for fuelling the rise of the AfD, which became the largest opposition party after an election last year that weakened both Merkel’s conservatives and the SPD. It is expected to come third in Bavaria on Oct. 14.

On Tuesday the AfD said removing Maassen as head of the BfV agency posed a threat to national security.