Turkish pop star Gulsen has been released from house arrest imposed over a joke she made on stage about religious schools.
The singer and songwriter, full name Gulsen Colakoglu, is facing charges of “inciting hatred and enmity”.
Last week, Gulsen, 46, was arrested and jailed over a joke she made during a concert in April, when she said one of her musicians’ “perversion” stemmed from attending a religious school.
Her arrest led to outrage on social media amid concerns over the independence of the Turkish judiciary, which has been questioned by opposition parties.
A court moved her from jail to house arrest four days later. On Monday, a Turkish court lifted the ruling, which forced one of the country's biggest pop stars to stay at home.
Turkish President Recep Tayyip Erdogan, who has been in power since 2003, studied at Imam Hatip school, which specialises in Islamic education.
Gulsen's joke was captured on a mobile phone and republished by a pro-government daily last month, causing an uproar in Mr Erdogan's ruling party in the run-up to next year's general election.
Gulsen issued a statement on social media saying that she was sorry her comments were being used to stoke further divisions in the sharply polarised country.
Turkey is officially secular but the majority of the population is Muslim.
The first hearing of the trial is set for October 21. If convicted, Gulsen faces up to three years in jail.