Turkey has banned all events by lesbian, gay, bisexual, trans and intersex rights groups in its capital city, Ankara.

The ban has been imposed to protect “public security”, the Ankara governor’s office said.

The restrictions came into effect on Saturday and will last for an “indefinite” period, applying to all LGBTI film screenings, theatres, panels and exhibitions.

The governor’s office claimed such events may cause animosity between different groups and endanger “health and morality”, as well as the rights and freedoms of others.

It warned some groups may be provoked by LGBTI events and take action against participants due to “certain social sensitivities”.

Unlike many Muslim countries, homosexuality is not a crime in Turkey and numerous LGBTI associations are legally registered with the state. But there is widespread hostility and rights activists say LGBTI people face discrimination and stigma.

The announcement by Ankara’s government is likely to deepen concern about civil liberties under President Recep Tayyip Erdogan.

Turkey's president Recep Erdogan wins referendum to greatly expand powers

Authorities in Ankara had already banned a German gay film festival on Wednesday, the day before it was due to start, citing public safety and terrorism risks. Organisers of Pink Life Queerfest said the ban “deprives us of our constitutional rights in the name of ‘protection’”.

Gay pride parades have been banned in Istanbul for the last two years running.

In June, 25 LGBTI rights supporters were arrested after attending a banned Pride march. They were later charged with participating in an unauthorised demonstration.

Istanbul’s local government had banned the march at the last minute on the grounds “it might lead to provocative actions and disrupt the public order”. Police in riot gear broke up the parade, firing rubber bullets at demonstrators, after organisers decided to press ahead with the event.

“Our security cannot be provided by imprisoning us behind walls, asking us to hide,” organisers said. “Our security will be provided by recognising us in the constitution, by securing justice, by equality and freedom.”

Earlier this month, Mr Erdogan accused the main opposition party of moving away from the country’s moral values after a small opposition-run district installed a quota for LGBTI candidates running for election to a neighbourhood committee.

The Turkish leader, a pious Muslim, said the pro-secular main opposition Republican People’s Party, or CHP, would learn “the lesson they deserve” at an election in 2019.