Lebanese authorities have banned the new Wonder Woman movie hours before it was due to premiere in the capital, following a campaign against its lead actress, Gal Gadot, who served in the Israeli army.

Cinemas in Beirut began removing the movie’s posters and cinema executives said the movie would not be shown because of the ban.

Lebanon is officially at war with Israel and the two countries have been through a number of wars. A particularly devastating 2006 war battered Lebanon’s infrastructure and left hundreds of civilians killed.

The ban is in accordance with a decades-old law that boycotts Israeli products and bars Lebanese citizens from travelling to Israel or having contacts with Israelis.

The ban, issued by the minister of interior, has been relayed to the distribution company, which in turn has to inform cinemas planning to show the movie.

A security official said violators of the ban would have to face legal consequences, but did not specify.

A campaigner against the movie, Rania Masri, hailed the decision to ban Wonder Woman, saying it signalled respect for the law. She said there was much anticipation as the decision was last minute, just before the official launch of the movie.

“Still, it was a joyous moment the minute the law was implemented,” said Ms Masri, of the Campaign to Boycott Supporters of Israel – Lebanon.

A similar campaign against last year’s Batman V Superman: Dawn Of Justice – also featuring Gadot as Wonder Woman – never turned into an outright ban. Ms Masri said it was “different” this time because of a major media campaign against the movie that has helped push for the ban.

On its front page on Wednesday, the leading al-Akhbar newspaper had a column titled: “The Israeli soldier. She has no place in Lebanon.” The column featured a picture of Gadot carrying her Wonder Woman shield.

Warner Bros, which has released the film, declined to comment.

Tensions have been rising between Israel and Hezbollah, with Israel reportedly bombing several Hezbollah targets in Syria in recent months. Israel has signalled that the targets were smuggling sophisticated weapons to Lebanon. Hezbollah officials said recently that they are not seeking war but are ready for it.

On her Facebook page, Gadot praised Israel’s military during the 2014 Gaza-Israel war, sending prayers to soldiers “who are risking their lives protecting my country against the horrific acts conducted by Hamas”.