A prominent Nigerian writer who was kidnapped last week after publishing an essay about anti-gay sentiment has been released following ransom demands and threats by his captors to murder him, BuzzFeed News can reveal.

Chibụìhè Obi, 24, who had been missing since 1 June, walked free on Sunday at approximately 10pm local time after international reports of his capture. It is not yet known if a ransom was paid.

A source close to Obi told BuzzFeed News that his abductors revealed his whereabouts on Facebook on Sunday night, but the location was so far from where he lives in Imo State, south-east Nigeria, that it was five hours before he could be picked up. He has now been reunited with his family.

His abduction follows other similar disappearances in Nigeria in recent months, according to Bisi Alimi, a leading Nigerian LGBT activist who was granted refugee status in Britain. “One of them got killed,” he told BuzzFeed News.

Obi was seized less than a fortnight after he wrote an essay entitled, “We’re Queer, We’re Here,” an evocation of the violence and silence engulfing gay people in Nigeria. The piece sparked multiple threats so severe as to cause Obi to consider fleeing the country, according to Alimi, who was in touch with him before his capture.

Friends of Obi’s raised the alarm on Friday night when he failed to attend a poetry event in Nsukka, Enugu state, adjacent to Imo State. The kidnappers, who hijacked Obi’s Facebook account, sent messages to his friends from his account to threaten the writer’s life. The authorities were then notified.