A councilman from Madrid has resigned after causing a media storm over a Holocaust joke he tweeted.

Spanish Councilman Guillermo Zapata wrote on his Twitter account, “How do you fit five million Jews in a SEAT 600 [a Spanish automobile]? In the ashtray.”

The tweet occurred in 2011 but only recently drew attention after Zapata rose to higher visibility in the Spanish government. The councilman’s left-wing Ahora Madrid party was victorious in last month’s election, and Zapata earned himself a new role as Madrid’s cultural and sports affairs minister.

Zapata has also made news in the past when he defended a journalist from the Spanish daily newspaper El Pais who denied the Holocaust on Twitter. That journalist was later fired.

The revelation of Zapata’s tweets caused public outrage in Spain, including in the Spanish Jewish community. Spain’s umbrella group of Jewish communities, the FCJE, called the Holocaust joke “anti-Semitic and repugnant.” On Twitter, two hashtags had been circulating calling for Zapata’s resignation, #ZapataDimisión or #ZapataDimision.

Zapata said on the Tumblr social network on Sunday that “some of those tweets, which were written within the context of a conversation on black humor, have been recovered with the goal of presenting them as though they represented my ideas… while in fact I do not defend them at all.” He also apologized on Twitter, but added that he considered the joke an expression of “black humor that helps reach catharsis.” Then, on Monday, he resigned from his post.