In January 1921 Russian Baltic Fleet sailor Afanasy Shaur organised an extraordinary gay wedding in Petrograd.
The guests included 95 former army officers along with members of the lower ranks of both the army and navy, and one woman, dressed in a man's suit.
The city had never seen anything like it.
Shaur pulled out all the stops. He did not think guests would come if it had just been a party.
But he gambled - rightly - that a proper wedding with all the Russian traditions, bread and salt, a blessing from the proud parents, and a concert to follow, would be irresistible.
At the time Russia's gay community was enjoying a brief window of tolerance.
After the October Revolution in 1917, the Bolsheviks scrapped and rewrote the country's laws. They produced two Criminal Codes - in 1922 and 1926 - and an article prohibiting gay sex was left off both.
But the wedding in Petrograd (now St Petersburg) was not all it seemed.
Afanasy Shaur was in fact a member of the secret police, and at the end of the festivities the guests were all arrested.
It emerged that Shaur had arranged the whole event as a way to curry favour with his bosses. He claimed these former military men were counter-revolutionaries who wanted to destroy the young Red Army from the inside.
But despite Shaur's efforts, the accusations did not stick. The case was eventually closed and the "counter-revolutionaries" got away with nothing more than a fright.
How to recognise 'one's own'
Gay men had been part of a distinct underground community in Russia long before the revolution and they recognised each other by the "secret language" of fashion.
In St Petersburg, some wore red ties, or red shawls, onto which they would sew the back pockets of trousers.
Others powdered their faces and wore a lot of mascara.
After the revolution, the heavily made-up "silent film star look" became more mainstream and no longer just a fashion for young gay men.
Read more about the Russian Revolution
The upheaval of the revolution and civil war brought hard times to Russia and gay men were not able to match the flamboyant clothes and luxury accessories favoured by some of their counterparts across Europe.
Legal but still persecuted
The Bolsheviks were indirectly influenced by Magnus Hirschfeld, a German scientist who founded the Institute of Sexology in Berlin.
Hirschfeld often spoke in public of his conviction that homosexuality was not a disease, but a natural manifestation of human sexuality.
But although there may not have been an article relating to gay sex in the criminal codes of the 1920s, the community was still persecuted. Gay men were often beaten, blackmailed or sacked from their jobs.
Some wrote heartfelt letters to the psychiatrist Vladimir Bekhterev, considering him their last hope. They poured out their souls, asking him to help them cope with depression and even to "cure their illness".
These letters and other documents show that members of the gay community were incredibly brave - some wore women's dresses and corsets, wore their hair long and often looked like real women.
'Aristocrats' and 'simple people'
Curiously, even though the revolution abolished class division, gay men continued to be divided by social classes. There were two gay communities and they rarely mixed.
The first were the so-called "aristocrats" - representatives of the creative intelligentsia, nobles, officials, and officers of the Tsarist army and navy.
The other community was "simple" (the name, evidently, was invented by the "aristocrats"). It consisted of soldiers, sailors, clerks - people who had not been part of the fashionable St Petersburg salons before the revolution and who were not welcome guests of the "aristocrats" after 1917.
In the 1920s, German Travesti theatre - in which men dress as women and vice versa - became popular among Soviet gay men. They were particularly fond of Hansi Sturm, the star of the Berlin night club El Dorado.
"Aristocrats" only rarely invited handsome men from the "simple" ranks to attend their extravagant soirees. But the male artists who dressed as women were not restrained by class restrictions.
They became stars and impersonated, among others, famous ballerinas like Matilda Kshesinskaya, who was mistress to Tsar Nicholas II.
Their wardrobes were full of beautiful costumes made by professional tailors. They used to rent them from the famous Petrograd tailor Leifert or have them made by him.
Before the revolution, Leifert was a supplier to the imperial court and he also made costumes for the dancers of the Mariinsky Theatre.
And then it all came to an end
After Afanasy Shaur's plot to ensnare "counter-revolutionaries" with his spectacular gay marriage ceremony, there were no more high-profile weddings or arrests like this in the 1920s.
Although homosexuality was tolerated, the community started to lose its freedom in the 1930s.
In July 1933, 175 gay men from different walks of life were arrested in what came to be known as the Case of the Leningrad Homosexuals.
While the full details of the case remain classified, it is known that all those detained were given prison sentences on a range of charges from working for British intelligence to "malicious counter-revolutionism" and "moral corruption of the Red Army".
It is thought that Shaur's "wedding" in 1921 played a significant role in this. The secret police had not forgotten his claims that "sodomizers were corrupting the army and navy".
Those same assertions were repeated in the early 1930s, as well as in forced confessions obtained by the secret police.
The Case of the Leningrad Homosexuals led to the re-inclusion of the article outlawing homosexuality in the new Criminal Code of 1934 and Russia's short-lived tolerance of gay rights finally came to an end.
Olga Khoroshilova was speaking to BBC Russian's Anna Kosinskaya.