Turkish pop star Gulsen has been arrested on charges of “inciting hatred and enmity” with a joke she made about Turkey’s religious schools, the country’s state-run news agency reported.

The 46-year-old singer and songwriter, whose full name is Gulsen Colakoglu, was taken away from her home in Istanbul for questioning and formally arrested late Thursday. She was then taken to a prison pending trial.

The arrest sparked outrage on social media. Government critics said the move was an effort by Turkish President Recep Tayyip Erdogan to consolidate support from his religious and conservative base ahead of elections in 10 months.

The charges were based on a joke Gulsen made during an April concert in Istanbul, where she quipped that one of her musicians’ “perversion” stemmed from attending a religious school. A video of the singer’s comment began circulating on social media recently, with a hashtag calling for her arrest.

Gulsen — who previously became a target in Islamic circles due to her revealing stage outfits and for unfurling an LGBTQ flag at a concert — apologized for the offense the joke caused but said her comments were seized on by those wanting to deepen polarization in the country.

During her questioning by court authorities, Gulsen rejected accusations that she incited hatred and enmity, and said she had “endless respect for the values and sensitivities of my country,” the state-run Anadolu Agency reported.

Her request to be released from custody pending the outcome of a trial was rejected.

Kemal Kilicdaroglu, leader of Turkey’s main opposition party, called on Turkey’s judges and prosecutors to release Gulsen.

“Don’t betray the law and justice; release the artist now!” he wrote on Twitter.

The spokesperson for Erdogan’s Justice and Development party, known by its Turkish acronym AKP, appeared however, to defend the decision to arrest the singer, saying “inciting hatred is not an art form.”

“Targeting a segment of society with the allegation of “perversion” and trying to polarize Turkey is a hate crime and a disgrace to humanity,” AKP spokesperson Omer Celik tweeted.

Erdogan and many members of his Islam-based ruling party are graduates of religious schools, which were originally established to train imams. The number of religious schools in Turkey has increased under Erdogan, who has promised to raise a “pious generation.”

Among those calling for Gulsen’s release was Turkish pop star, Tarkan, best known internationally for the song Kiss Kiss.

“Our legal system, which turns a blind eye to corruption, thieves, those who break the law and massacre nature, those who kill animals and those who use religion to polarize society through their bigoted ideas — has arrested Gulsen in one whack,” Tarkan said in a statement posted on Twitter.