Netflix has abandoned a planned Turkish series due to pressure from local authorities to remove a gay character.

The eight-part romantic drama, which stars well-known Turkish actress Özge Özpirinçci, was ordered to series in March with screenwriter Ece Yörenç serving as creator and showrunner.

According to a press release from Netflix, the series follows an unhappy married woman called Reyhan, who – thanks to the “strongest blood moon eclipse of the past 500 years” – travels back in time “with the wisdom of her 30 year old self.”

The film generated controversy after Turkish officials learned about the inclusion of a gay character, with Yörenç telling Turkish film website Altyazi Fasikul that “permission to film the series was not granted” because of it.

Turkish officials are permitted to see film or television scripts before granting filming permits.

Instead of removing the gay character from the script and relinquishing creative control, Netflix decided to cancel the series.

“Netflix remains deeply committed to our Turkish members and the creative community in Turkey,” a spokesperson told TheWrap. “We are proud of the incredible talent we work with.

“We currently have several Turkish originals in production — with more to come — and look forward to sharing these stories with our members all around the world.”

Following news of If Only’s cancellation, Yörenç retweeted a quote from Netflix CEO Reed Hastings, who told Turkish newspaper Hürriyet in 2018 that he was not concerned about censorship in the country.

“We’re in Saudi Arabia. We’re in Pakistan. If there are no problems there, will we have problems in Turkey? I can’t imagine that,” he reportedly said.

Although homosexuality is legal in Turkey, sexual orientation and gender identity is not protected under civil law, and there is no legal recognition for same-sex couples. Pride festivals are also routinely banned and met with violence from anti-LGBTQ+ protestors.

The country even decided to leave the Eurovision Song Contest due to the festival’s LGBTQ+ representation.

“As a public broadcaster we cannot broadcast live at 9pm, when children are watching, an Austrian with a beard and a skirt, who claims not to have a gender and says ‘I am a man and a woman at the same time’,” said Ibrahim Eren, who used to run the Radio and Television Corporation.

“There is some kind of confusion of mentality here… once this is corrected we will return to Eurovision.”

Related: Netflix faces boycott calls in Turkey after rumour of gay character in Love 101.