A Tunisian court has released three European (one German and two French) feminist activists who staged a topless protest in Tunis last month against the government.

Wednesday's release of the three women, who are members of women's rights group Femen, comes ahead of a planned visit by French President Francois Hollande early next month.

The decision to jail the three European women angered France, Germany and Tunisia's main economic ally European Union who urged the government to regulate its laws on freedom of expression. 

They were sentenced to four months in jail for indecency and attacking the public morals earlier this month after their protest on May 29 to call for the release of fellow Tunisian activist Amina Tyler.

The 18-year old Tyler is still in custody, awaiting trial. She was arrested in Kairouan on May 19 after she hung a feminist banner from the wall of a mosque and tried to bare her breasts, on the same day that the group calling themselves Islamist Ansar al-Sharia held a rally in the city that authorities tried to ban.

Witnesses said the women left the prison of Manouba late on Wednesday night amid a protest of a small group against Femen activists outside of the court. They would fly back to Europe on Thursday morning.

Tunisia was the first country to be rocked by an "Arab Spring" uprising, inspiring similar revolutions in Egypt and Libya.

Secular groups say the Islamist-led government is trying to stifle freedom of expression and creativity, but the government strongly denies this.

Source: Agencies