The Madrid alderman for culture under fire for posting a joke about the Holocaust on Twitter four years ago has resigned.

Guillermo Zapata resigned Monday after opposition parties and the umbrella group for Jewish communities in Spain demanded he step down, the Spanish daily El Pais reported. Madrid Mayor Manuela Carmena, who took office on Saturday, accepted the resignation.

Zapata, who previously worked as a script writer and novelist, assumed his post last week after his left-wing party won in municipal elections in May.

In 2011 he tweeted, “How do you fit five million Jews into a 600? In the ashtray.”

The figure 600 is a reference to the SEAT 600, an iconic Spain-made 1970s urban automobile that weighed less than 600 kilograms, or 1,200 pounds. Bodies of murdered Jews and other victims of Nazism were regularly burned to ash in crematoria that the Nazis set up in extermination camps across Europe.

FCJE, the umbrella group for Jewish communities in Spain, in a statement issued Sunday said Carmena should ask for Zapata’s resignation or dismiss him immediately. The group termed the joke “anti-Semitic and repugnant.” FCJE also called on municipal authorities to initiate legal action against Zapata.

Zapata, a member of Carmena’s Madrid Now party, or Ahora Madrid, apologized for any offense caused by his joke but defended it as harmless. On Saturday he wrote on Twitter that he was neither anti-Semitic “nor a supporter of violence.” He added: “I apologize to all who may have been offended” by his statement.

But he also wrote that his joke was merely an expression of “black humor that helps reach catharsis.”

editor@jewishweek.org