ANKARA, Turkey — In a recent play in Turkey, two actors wore trench coats in their roles as assassins posing as perverts planning to flash girls near a school.

The scene and its themes of nudity and sexual depravity are at the center of a debate over freedom of expression in Turkish arts, where the Islamic-rooted ruling party has become increasingly critical of plays and television shows deemed to violate moral or religious values.

Turkey, a candidate for European Union membership, is less strict than many other nations in the Muslim world. But Prime Minister Recep Tayyip Erdogan last week backed a move by Istanbul’s Islamist mayor to take over decision-making at Istanbul City Theaters, a theater troupe which is funded by the city and staged the play that outraged conservative critics.

Erdogan also threatened to privatize state-run theaters — essentially cutting their funding — in response to resignations and protests by secular-minded artists against alleged political interference.

That stoked fears that the government, which has a strong electoral mandate, might be seeking to put an Islamic stamp on daily life in this predominantly Muslim country that has long been proud of its secular political system.

Erdogan for his part accuses artists of arrogance.

“They have started to humiliate and look down on us and all conservatives,” Erdogan said.

The prime minister’s remarks triggered an overnight sit-in by hundreds of artists outside an Istanbul theater. The protest came days after hundreds of artists, beating drums, marched through a main city street.

Artists marched again on May Day with banners that read: “Oh Sultan! Take your hands off theaters.”

“This is political interference on freedom of art,” said Nazif Uslu, an actor and official from the Theater Actors’ Association of Turkey.

The scene with the flashers comes in the political comedy “Secret Obscenities,” by Chilean playwright Marco Antonio de la Parra. It criticizes human-rights abuses in Chile during the dictatorship of Gen. Augusto Pinochet.

Yildirim Fikret Urag, the Turkish director of “Secret Obscenities,” said the play will likely be removed from the repertoire of Istanbul City Theaters due to pressure from the board of the pro-Islamic municipality.

The play, which was restricted to audiences above the age of 16, was described as “vulgarity at the hands of the state” by Iskender Pala, a conservative columnist for daily Zaman newspaper. Pala, however, said that he did not watch the play but only read its script.

“The play has nothing to do with obscenity; it is pure black humor,” Urag said. The play was staged more than 70 times between February and mid-April as originally scheduled. “I think, the word ‘obscenities’ in its name and the tag of plus- 16 are used as excuses to seize control of theaters.”

Culture Minister Ertugrul Gunay sought to reassure the public. “I wish for everybody to get rid of this worry. The artistic and cultural life in Turkey will in no way go backward,” Gunay said.

But Erdogan suggested that state support for theater should be contingent on stagings that meet state approval. “If support is needed, then as the government we provide sponsorship to plays we want,” he said.

Erdogan’s proposal came after Mustafa Isen, secretary general of the presidential palace, proposed establishing conservative artistic norms.

The government is currently scrutinizing a weekly TV police show, “Behzat C,” in which the lead character, a homicide detective, drinks alcohol, curses and beats suspects.

The broadcaster, Star TV, said it has no plans to remove the show. But Muzaffer Balci, the president of the country’s Green Crescent Society, which fights alcohol and tobacco consumption, has predicted it will not last.