Most of St. Petersburg seems to have taken off for the dacha, but Monday afternoon found Manny de Guerre and Gulya Sultanova ensconced in their tiny office by the train station, rainbow-colored blinds drawn against the fabulously sunny day outside. The two women had plenty to do: on Friday, organizers of Side by Side, Russia’s first L.G.B.T. film festival, lost their appeal in a St. Petersburg district court. Under a law signed by Putin last year, the festival—which has been running since 2008—was fined four hundred thousand rubles for failing to register in Russia as a “foreign agent.”

The decision makes Side by Side one of the most harshly penalized nonprofits under the foreign-agents law, which requires N.G.O.s receiving international funding to formally identify themselves as something akin to spies. Never mind that—as the festival’s lawyers argued—the grant that Side by Side received last year from the Dutch consulate had been spent before the new law, which isn’t supposed to be retroactive, went into effect on November 21st. Or that the raid conducted in March on Side by Side, along with scores of N.G.O.s across the country, was rife with irregularities. Or that the foreign-agents law is of questionable constitutionality. Or that the so-called “political activity” the film festival failed to report consisted mainly of pamphlets dealing with issues like how to come out, L.G.B.T. history in Russia, and lists of suggested non-derogatory vocabulary for independent journalists to substitute for “blue boys,” “pink girls,” and “homosexualists” in their writing.

“The main problem,” said Sultanova, a slight woman with close-cropped hair and a ballerina’s posture who is the festival’s director, “is that the state can do anything it wants.” “We’ve got used to it,” said de Guerre, who founded the festival. “Unfortunately.”

De Guerre, who is British, first came to Russia in the mid-nineties to research her Ph.D. on the social significance of Russian rock music. Travelling around the country, she met a number of closeted men and women. “Being a lesbian myself, it was obviously interesting for me to get acquainted with people in the L.G.B.T. community,” she said. While homosexuality had been decriminalized in 1993, “there was a lot of homophobia, a lot of people living double lives.”

She moved to St. Petersburg permanently a few years later and, in 2007, decided to start the film festival with a friend. “It was an idea I had always had,” she said. “I saw these festivals in other places, and thought we should have one, too. I didn’t think it would be such a problem—I guess we were a little naïve.” Days before the first festival, in 2008, all the venues that had agreed to hold screenings were shut down for mysterious fire-code violations. The festival took place anyway, in last-minute locations whose addresses were communicated via text message. “People came from Moscow,” said de Guerre. “There was nothing like this in Russia.” After that, things in St. Petersburg ran smoothly for the next several years. While Side by Side was banned four more times as it expanded to the provinces, the film festival nonetheless found homes in far-flung places like Novosibirsk and Archangel.

De Guerre said that the event helps fill a void in Russian culture, which is still deeply homophobic and where, until recently, homosexuality was rarely discussed. “We get e-mails like, ‘I came to the festival and afterward, I went home and came out. It was a difficult coming out, but the festival gave me the strength,’ ” she said. “Thirty per cent of our audience is straight, and they say the festival is a really valuable source of information. Otherwise, there’s only state-run TV, which is full of rubbish stereotypes. It’s important to people to have other images of what it is to be lesbian or gay.”

This statement drew a nod of assent from Zhanna Yurieva. She’s twenty-five and had always loved women but didn’t realize same-sex relationships were possible before she found a lesbian community in her hometown of Nizhny Novgorod on the Internet. A bubbly legal assistant, Yurieva said she volunteers at the festival because she feels that a more open dialogue in Russia would open the minds of people like her girlfriend’s father, who believes his daughter is ill. “As a loving parent, he thinks he needs to protect her from herself,” she said, her bright smile dimming briefly. “I think he could change. But he needs help.”

For the Swedish director Marcus Lindeen, who travelled to St. Petersburg in 2011 for a screening of his film, “Regretters,” the festival was like none other he had experienced. “After my film was over, there was a really long discussion with the audience,” he recalled, in an e-mail. “The questions were so long, sometimes several minutes. This is when I understood that the festival wasn’t only about showing new queer films from around the world but actually being a platform where queer people could meet and discuss their situations.” Stories he heard of casual homophobic violence shocked him. “It was like getting thrown back into a Stonewall situation that I am too young to have experienced.”

By 2012, the festival was drawing more than two thousand people to St. Petersburg; some screenings were held in mainstream cinemas. “They even had our posters up outside,” de Guerre said, a little wistfully. Now, under the “gay-propaganda” law, which makes providing information about homosexuality to minors a punishable offense, the posters—and perhaps a good deal more—are a thing of the past. “We don’t know if our Web site will fall under the new law,” said de Guerre, noting that a Dutch documentary-film team who had visited the Side by Side office a few weeks earlier was detained by police in Murmansk shortly thereafter, and accused of violating the propaganda law.

Attendance at Side by Side’s third festival in the Siberian city of Tomsk, which coincided with the first day the propaganda law took effect, on June 30th, was also way down. “People were frightened,” said de Guerre, “There are the same biases here as there were in the U.K. or the U.S. in the nineteen-fifties or sixties.” “The difference is that we are living in a totalitarian country,” interjected Sultanova. “In other countries, you had the possibility to speak out. Maybe we will not have that possibility. At all.”

Thanks largely, but not exclusively, to international donations, it looks like Side by Side will be able to raise the funds to pay the foreign-agents fine. But the situation is dark. Taking a break from phone calls and e-mails, Sultanova and de Guerre rattled off a hair-raising list of recent events that they see as the result of the government’s new homophobic rhetoric and legislation, including a Siberian lawmaker’s proposal to allow Cossacks to conduct public whippings (one gay-rights activist joked that he thought that was fine, as long as corrupt deputies have their hands cut off), and a practice in which right-wing nationalists use the Internet to lure teen-age boys on dates, brutally “reëducate” them, and post videos of it online. “It’s getting more dangerous in the last three or four months, absolutely,” said Sultanova.

Nonetheless, she has no intention of giving up. “I grew up in the Soviet time,” said Sultanova, sitting back in her office chair. “When I was fifteen, I fell in love with a woman. It was a horror for me. Of course I couldn’t say anything to that person, or to my family. For me, it was like an illness. This was the early nineties, and there was absolutely no information about homosexuality. I had a very heavy inner homophobia.” While studying German, she came across literature that gave her a different perspective on homosexuality, and toward the end of the nineties, she had found an underground community. “I wanted to do something for people like me,” she said. “Other people said, ‘You can do nothing. It’s Russia. No one cares.’ ” Eventually, she met some like-minded activists, and was able to come out to her family. “I became an open person. It was very healthy, physically and psychologically.”

While many in her circle are thinking of emigrating, Sultanova said that would be the last recourse for her. “I think it’s important to hold on here until the end—when the danger of imprisonment is absolutely realistic. I don’t want to leave Russia. My family is here, and my friends. When all the active people leave Russia, there’s no chance.”

Gay-rights activists at a rally in St. Petersburg, Russia. Photograph by Dmitry Lovetsky/AP.