TUNIS, Tunisia — A Tunisian court on Wednesday suspended prison sentences for three European feminist activists who were jailed after a topless courthouse protest last month, their lawyer said.

The lawyer, Bahri Souhaib, said the women were to be freed immediately and would leave Tunisia as soon as possible.

The two French and a German member of the Ukrainian feminist group Femen maintained during the trial that there was nothing sexual or offensive about their protest and that it was only to support their imprisoned Tunisian colleague. All three apologized Wednesday during their appeals hearing.

The three women had been convicted and sentenced to four months and a day of prison for public indecency, offending public morals and threatening public order after they demonstrated topless in front of the court building on May 29 on behalf of Amina Sboui.

The protest was the first of its kind in the Middle East for Femen, which has used nudity to push for greater rights for women across Europe.

"I didn't think it was going to shock Tunisians to that extent. Given the consequences, I would never do it again. We want to return to our country and our loved ones," Frenchwoman Pauline Hillier said at Wednesday's hearing.

Ivan Terel, a French lawyer for the women, said their message was misunderstood and they were fighting "for the rights of women wherever they are threatened."

On the opening day of the trial June 5, three other Femen activists were discovered by authorities and deported on suspicions they planned another protest.

Long a favored tourist destination for Europeans, Tunisians overthrew their secular dictator in 2011, kicking off uprisings across the region. In the ensuing years, however, there has been a rise in conservative Islamist movements at odds with the country's longstanding image as secular and progressive — especially in regard to women's rights.

The Femen activists were calling for the release of Sboui, a Tunisian member of Femen who scandalized the country in March by posting topless photos of herself as a protest. She later attempted another protest May 19 in the religious center of Kairouan, where she was arrested.

Sboui has already been convicted of carrying pepper spray and assessed a small fine.