Two gay men whose marriage was registered by Russian officials have fled the country after receiving death threats and having the electricity and internet reportedly cut off by plainclothes police who besieged their apartment in Moscow. Pavel Stotsko and Yevgeny Voitsekhovsky said they got married in Denmark earlier this month, after which they submitted their passports to a register’s office in Moscow, where a clerk put marriage stamps on the documents.

Although homosexuality is not illegal in Russia, gay marriage is. Stotsko said, however, that he had exploited a legal loophole, citing a law that means Russia recognises marriages registered abroad. He posted online photos of the stamps in the passports, a move that sparked widespread outrage. Vitaly Milonov, a Russian MP and the author of Russia’s law banning so-called gay propaganda, said the marriage stamps had no legal validity and likened the couple to “stinking goats”.

LGBT rights groups said homophobic attacks had rocketed in Russia since President Vladimir Putin approved the controversial law outlawing the promotion of a homosexual lifestyle to minors in 2013. Dozens of gay men were reportedly detained and tortured in Chechnya, a mainly Muslim republic in southern Russia, last year.

The interior ministry announced that the men’s passports would be annulled and that the clerk who stamped them would be dismissed. It also said that the couple would face a fine for defacing their passports – a charge the men have denied.

All Russians over 16 must by law possess internal passports that document their place of residence and marital status. They cannot be used for foreign travel.

Stotsko, a doctor, wrote on Facebook that he had received online threats from people vowing to “rip off his head”, while his mother had received anonymous telephone calls promising that she would lose her job if she did not convince him to retract his statement about the marriage stamps.

“Police blocked the exit from the apartment where the couple live, as well as prevented friends and acquaintances from coming to support them,” Russian LGBT Network, a gay rights group, said. It also said that police had told the couple they could not guarantee their safety, a statement that was interpreted by the organisation as a thinly veiled threat.

Igor Kochetov, a LGBT rights activist, told Russian independent media on Monday that Stotsko and Voitsekhovsky had given their internal passports to police on their lawyer’s advice and left the country. “They were in real danger,” he said.

The couple did not respond to a request for comment.