A court in Tunisia has banned Wonder Woman, a US film starring a former soldier with the Israeli army, more than a month after it was scheduled to open at cinemas, a legal source said.

The film was due to be screened at two venues in Tunis in early June, but the showings were "suspended" following a complaint from the nationalist al-Chaab party.

The court finally decided to impose the ban last Friday, prosecution spokesman Sofiene Sliti said.

The verdict was only disclosed to the media this week without a reason given for the judgement.

Al-Chaab demanded the film be banned in Tunisia because Gadot had defended Israel's 2014 war on the Palestinian enclave of Gaza on Facebook.

READ MORE: Lebanon bans Wonder Woman film over Israeli actress

The case sparked controversy in the North African country, with supporters of the ban calling for "no normalisation" of ties with the Jewish state and others criticising censorship.

Tunisia has maintained limited ties with Israel since the 1950s.

The movie is based on a comic book character introduced in 1941, fighting villains, rescuing victims and unearthing evil plots.

It has faced a backlash in the Arab world because an Israeli actress, Gal Gadot, plays the lead role.

READ OPINION: Watching 'Wonder Woman' in Gaza

Gadot served two years of compulsory military service in the Israeli army and has railed against Hamas, the Gaza-based Palestinian political group, on social media.

With the ruling, Tunisia joins Lebanon and Qatar which have also banned the film from its cinemas.

Lebanon, which is officially at war with Israel, banned Wonder Woman in May on the grounds of a long-standing boycott of the country.

Jordan briefly imposed a ban on the film last month before approving it for screening.