Berlin (CNN) The head of Germany's domestic spy agency has been removed after accusations of showing sympathy for the far-right party Alternative for Germany (AfD), government spokesman Steffen Seibert said Tuesday.

The news was announced following crisis talks over the future of Hans-Georg Maassen between Chancellor Angela Merkel, Interior Minister Horst Seehofer, and Socialist Democrats head Andrea Nahles, who are the leaders of the three parties in government. The issue has threatened to split a fragile coalition.

Maassen will leave the intelligence agency but take a new post in the Interior Ministry under Seehofer, Seibert said via Twitter . The solution is apparently designed to appease both Nahles, who called for Maassen to go, and Seehofer, a staunch defender of the spy chief and critic of Merkel's immigration policies.

The main allegation against Maassen relates to his comments about a viral video appearing to show protesters hounding migrants during a violent right-wing demonstration in the eastern city of Chemnitz. The death of German-Cuban man Daniel Hillig and arrests of an Iraqi and a Syrian sparked demonstrations last month. The Iraqi man has since been released from custody, Chemnitz prosecutor said Tuesday.

In an interview with tabloid newspaper Bild almost two weeks ago, Maassen claimed the video could have been faked and cast doubt on widespread reports that some protesters in Chemnitz had "hunted" migrants. Maassen led the Office of Constitutional Protection, which monitors extremist organizations that threaten Germany's democratic institutions.

Senior politicians and media outlets claimed they had authenticated the video and made repeated requests for Maassen to reveal evidence to back up his claims. He wrote to Interior Minister Seehofer that the video had not been falsified and that his comments had been misunderstood, according to reports in German media.

Maassen said he had meant to express doubt about whether the video genuinely showed people being chased, the papers wrote. He denies accusations of showing favor to the far right and the AfD in his comments relating to Chemnitz and in holding meetings with AfD politicians.

Politicians from parties across the spectrum, except the AfD, called for Maassen's resignation.

Writing on Twitter last Thursday, General Secretary of the Social Democrats Lars Klingbeil said that it was "absolutely clear" to the party leadership "that Maassen must go."

"Merkel must act now," Klingbeil said.

JUST WATCHED Far-right rally in Germany sparks mob violence Replay More Videos ... MUST WATCH Far-right rally in Germany sparks mob violence 03:13

Refugee: Video 'proves that we were attacked'

Thousands of people took to the streets of Chemnitz to protest migrants last month, some calling for the return of National Socialism and for foreigners to leave Germany. It was the biggest display of far-right sentiment in the country for many years and triggered a national debate.

Several further demonstrations and counter-demonstrations were held across eastern Germany, often attracting thousands of right-wing protesters.

Maassen's comments to Bild came as a surprise to many citizens and journalists who had been present at the protests and posted footage and reports of demonstrators harassing people with foreign appearances.

Bahrain Mohammaed Afshar, a refugee living in Chemnitz, told CNN that he saw one of his friends chased by several people in a protest. He said the moment had been captured on a social media video.

"This video is now with police. And hopefully this proves that we were attacked," he told CNN. He said that since the video had been shared widely, he has become fearful of repercussions.

"Everyone knows us now. I don't know where we can go. I am afraid that each time I go onto the streets, people will recognize us," Afshar said.

Merkel also has been sharply criticized for her handling of the protests and the AfD. Despite weeks of demonstrations in eastern Germany, Merkel has not visited the affected towns, delegating that duty to the Families and Education Minister.