Anne Frank, whose quote was tweeted with a yellow ribbon in support of jailed Catalan leaders.
Photograph: AFP/Getty Images

The Israeli embassy in Madrid has accused the Catalan government of using the Holocaust “to promote a political cause”, after its spokeswoman tweeted a quote from Anne Frank alongside a picture of the yellow ribbon worn in solidarity with jailed or exiled regional independence leaders.

“We aren’t allowed to have any opinions. People can tell you to keep your mouth shut, but it doesn’t stop you having your own opinion … No one should be prevented from saying what they think,” ran the abridged quote.

Artadi added: “A very appropriate quote from Anne Frank, who died in Bergen-Belsen 69 years ago today.” In fact, Frank died 74 years ago, in February or March 1945.

Spain’s electoral commission has ordered the pro-independence Catalan government to remove yellow ribbons and separatist estelada flags from official buildings because it says they are partisan symbols and should not be used by regional authorities in the run-up to general and European elections in April and May.

Assaf Moran, Israel’s deputy chief of mission to Spain, said of Artadi’s tweet: “Nothing, but nothing can be compared to the Holocaust to promote a political cause. This comparison is a disgrace!”

The former French prime minister Manuel Valls, who is running for the mayoralty of Barcelona in May’s elections, also criticised the tweet. “A disgrace and a lack of historical knowledge. Spain is a democracy. How can it be compared to the Holocaust? Enough of all this nonsense!”

In January last year, the former Catalan president Carles Puigdemont, who went into exile after his government’s failed bid for independence, was criticised for tweeting and praising a video that featured images of the then Spanish prime minister, Mariano Rajoy, along with archive footage of Hitler and Franco.

Twelve Catalan leaders are on trial in Madrid for the parts they are alleged to have played in the region’s attempt to break away from Spain in autumn 2017.

Nine of the defendants, who include the former Catalan vice-president Oriol Junqueras, the former speaker of the Catalan parliament Carme Forcadell and two influential grassroots activists, Jordi Cuixart and Jordi Sànchez, are accused of rebellion, which carries a prison sentence of up to 25 years. Other charges include sedition and the misuse of public funds.