BERLIN — The director of Berlin’s Jewish Museum quit his post on Friday amid criticism that he had become too politically involved in the battle over the boycott, divestment and sanctions movement against Israel, which was recently designated as anti-Semitic by the German Parliament.

Pressure had been mounting against the director, Peter Schäfer, over what critics said was an inappropriately political stance for the head of a cultural institution tasked with explaining Jewish traditions, history and art. An exhibition that opened last year about Jerusalem was accused of being anti-Israeli in a prominent, unsigned letter, criticism that Israeli officials said they agreed with at the time.

And Mr. Schäfer himself was criticized last year for inviting a Palestinian scholar to give a lecture at the museum and giving a personal tour to the cultural director of the Iranian Embassy.

But it was a post by the museum’s Twitter account last week that sparked the backlash that Mr. Schäfer could no longer withstand. The post promoted an article from a German daily that cited an open letter signed by 240 Jewish and Israeli scholars. In the letter, which was issued before Parliament acted, the scholars urged lawmakers not to sign the resolution declaring the boycott, divestment and sanctions movement, known as B.D.S., anti-Semitic.