What does it mean to be a revolutionary?

In the early days of Fidel Castro’s Cuba, being a revolutionary wasn’t just about commitment to socialist philosophy. It also reflected a certain machismo, a view of “a new man,” who “couldn’t be gay.” So says Luis Perez, himself gay and one of the subjects of Mariela’s March: Cuba’s LGBT Revolution, director Jon Alpert’s new documentary, which now takes on an extra layer of timeliness since it premieres on HBO at 9 p.m. on Monday, Nov. 28, just days after Castro’s Nov. 25 death.

Perez’s unsparing view of the Cuban Revolution was earned through his two years of toil at one of the misnamed “Military Units to Aid Production” during the 1960s. Gay men were sent to these facilities for conversion, for punishment, and as a kind of deterrence. After doing his time at what amounted to forced labor, Perez was rewarded by having his identification card “branded” with his incarceration and thereby shut out of education and employment.

Other stories from the early days of the revolution were equally harrowing, some even worse. One unidentified trans woman explains that she wears sunglasses because of an incident long ago. She then removes the glasses to show an eye bleached by acid that was thrown in her face.

Margarita Diaz, a Cuban tennis champion, sadly recounts her experience of being kicked off the national team in 1988 because of her unfeminine ways.

Then there’s Yanet, a self-described “peasant” who lives in the Sierra Maestra Mountains. She and Mailin are in in a long-term relationship and seem happy enough. The young man who directs the filmmaker to the lesbian couple affirms that everyone in the area knows and respects them. Yet Yanet continues to suffer from discrimination at work—although she can’t prove it.

If Yanet could show that she’d been mistreated, though, she would be protected by Cuba’s employment nondiscrimination law. Today, Cuba is in some ways more LGBTQ-friendly than the United States (at least certain parts of it). Most notably, since 2008 the free national health system has offered sex-reassignment surgery—and a few of the principals in the film have taken advantage of this enormous benefit. For instance, Juani (formerly Juana) and his brother, Santi, have lived in the north shore Matanzas province for their entire 60-plus years. Juani dressed in boys’ clothes as a child, and suffered for it. His brother burned his clothes (Juani’s apt response was to don his brother’s outfits), and his mother—who looks to be in her 90s—admits she didn’t know how to deal with Juani’s gender presentation, either. Now, though, mom and brother are totally relaxed around Juani.

What brought about this change? After all, this is a culture that, until quite recently, was extremely isolated. The documentary gives a hefty share of the credit to the woman name-checked in the title: Mariela Castro. She’s the daughter of Raul Castro, the niece of Fidel, and a member of the Cuban parliament. (There, she cast what appears to have been the first and still the only “no” vote in the history of the institution—to a proposed labor law that didn’t protect HIV status or gender identity.) Juani produces a photo of a beaming Mariela standing at his bedside at the hospital, right after his gender-affirming surgery.

Mariela does a great deal of beaming in this film, and she does it just about everywhere. She’s on a bus with members of the LGBTQ community, traveling to remote outposts to make the case for acceptance. She’s at the head of a parade as marchers chant her now iconic first name. She’s speaking at a rally to a rapturous audience. And she tells us that she is the director of the national Center for Sex Education, which seems heavily focused on LGBTQ rights and acceptance.

Any cult of personality comes with a price, of course—perhaps no more so than when those in thrall to the leader are as dependent as Cuba’s LGBTQ community. But it probably couldn’t have been otherwise in a country that was ruled by the same revolutionary leader for some 50 years—a man who was then succeeded by his brother. And Mariela, for all her real advocacy, still chants the music of the revolution, tying LGBTQ rights to the same broader, more modern construction of socialism that her father has been selling of late. She marches through the streets with a huge LGBTQ retinue, all chanting: “Socialism Yes! Homophobia No!”

It helps, too, that toward the end of his life Fidel Castro expressed regret about the labor camps, calling them “a great injustice” and accepting blame for their terrible conditions. The socialist who once thought of homosexuality as a creation of the bourgeoisie experienced something of a late-in-life conversion.

Cuba’s LGBTQ movement is exploding in a country that is still socialist, though, and the documentary might have done a better job of exploring how that affects the lives of the subject population, for good and for ill. For an example of both, look no further than HIV/AIDS, which in Cuba appears predominantly to affect gay and bisexual men. While even the most virulent homophobes in the U.S. gave up on their early efforts to quarantine HIV-positive people, Cuba’s HIV population was isolated, and that quarantine wasn’t lifted until 1993. A comprehensive public health approach continues today, though it has taken less draconian forms. Cuba is taking care of its citizens by distributing condoms, supporting the health of sex workers, providing robust sex education, and making sure everyone has access to anti-retroviral drugs. It’s hardly surprising, then, that Cuba reports vanishingly low rates of HIV infections and deaths.

HIV aside, there’s a long way to go. Mariela Castro can do only so much in a macho culture that makes acceptance a challenge, especially for effeminate men. Even Juani spends a distressing amount of screen time and energy discussing his fully functioning penis, to which he has even given a name. (Pancho, in case you were wondering.) In some ways, it’s still easier for a trans man to navigate the homophobia and transphobia than a more visible gender challenger, like an outré trans woman who flaunts her boobs at a startled rural crowd.

On my trip to Cuba earlier this year, the evidence of a more LGBTQ-accepting society was everywhere, from the clubs in Havana to an art gallery where I stood a bit amazed before a black-and-white photo that depicted two nude men locked in a passionate embrace. Mariela’s March depicts only a small slice of that changing landscape, but it’s a slice well worth consuming.