BERLIN — After a far-right lawmaker accused Germany’s president of “eroding” the rule of law and circulated remarks widely viewed as anti-Semitic, his colleagues on Wednesday ousted him as chair of a parliamentary committee on the grounds that he was unfit for office.

The decision to remove Stephan Brandner, a member of the Alternative for Germany party, from his post was the first such move in the nation’s post-World War II history. It comes as the country’s mainstream parties are struggling with how best to handle the party amid a growing fear over the rise of radicalization in the country.

The persistent popularity of the far-right party, known as the AfD, and its representation in state and municipal assemblies across the country, has forced traditional parties to debate whether to isolate it or cooperate with it.

Mr. Brandner, who was chairman of the legal affairs committee in Parliament, provoked outrage among lawmakers when he reposted a comment on Twitter that questioned the outpouring of solidarity with Jews and Muslims that followed a neo-Nazi’s thwarted attack last month on a synagogue in Halle.