Tyler, 18, remains 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 Islamist Ansar al-Sharia group held a rally in the city that authorities tried to ban.

The decision to jail the three European women angered France, Germany and the European Union who urged the Islamist-led government to reform its laws on freedom of expression.

"The court sentenced these three activists to four months suspended jail terms... (the) women would leave Tunisia as soon as possible", one of their lawyers, Souhaib Bahri, told Reuters.

Anis Mili / Reuters, file

Police officers detain an activist from the feminist group Femen during a protest against the arrest of their Tunisian member Amina Tyler, in front of Tunisia's Ministry of Justice in Tunis May 29, 2013.

Witnesses said the women left the prison of Manouba late on Wednesday night.

Marguerite Stern and Pauline Hillier of France and Josephine Markmann of Germany apologized on Wednesday during their appeals hearing.

"I didn't think it was going to shock Tunisians to that extent. I would never do it again. We want to return to our country and our loved ones," Hillier said.

Femen has staged protests across Europe, mainly against Russia's detention of the all-female Pussy Riot punk band last year.

The new government is led by a moderate Islamist party, Ennahda, but hardline Islamist Salafists are seeking a broader role for religion, alarming a secular elite which fears this could undermine individual freedoms, women's rights and democracy.

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.