The organizer of Beirut Pride said he was detained overnight by Lebanese authorities who released him only when he signed a pledge to cancel the week’s remaining events.

Lebanon last year became the first Arab country to hold a gay pride week, though the opening event was canceled because of safety concerns after threats of violence.

This year’s pride week began on May 12 and was due to run until May 20.

Lebanon is widely seen as more socially liberal than most other Arab countries, but lesbian, gay, bisexual and transgender people say they are still discriminated against by state and society.

In a statement on the Beirut Pride website, organizer Hadi Damien said that security services turned up late on Tuesday at a public reading of a theater play. Damien said he was taken to a police station overnight and questioned.

Damien said he was asked to sign a pledge promising to cancel upcoming events and in return he would be released.

The Interior Ministry said it was unable to provide immediate comment.

Damien said he was told that if he refused to sign the pledge, he would be referred to the investigation judge for interrogation on the basis of articles pertaining to the incitement to immorality and to the breach of public morality for coordinating the activities.

On legal advice, Damien signed the pledge, he said in the statement.

Lebanon’s laws prohibit “unnatural” sex, without giving further definition, which has been used to criminalize gay sex. Last year a Lebanese judge said that same-sex relations do not contradict laws of nature, a move welcomed by rights activists.

Damien said the public prosecution had received an Arabic version of the Beirut Pride program that was “completely distorted, making Beirut Pride appear like events of debauchery and disrespect of general law, while using derogatory terms to refer to LGBT individuals.

Ghenwa Samhat, executive director of Lebanese LGBT rights organization Helem, said that many rights organizations in Lebanon experience such pressures.

“These things are not new to us,” Samhat said.

But in the 20 years since the LGBT rights movement began in Lebanon, progress has been made.

“People can express themselves in public places, There are places friendly to LGBTQ+, where they face no problems,” she said.

Positive media coverage surrounding Beirut Pride and activities for the annual International Day against Homophobia and Transphobia on May 17 can also be counted as an achievement, Samhat said.