Alfredo Guevara, who died on Friday in Havana, at the age of eighty-seven, was seven months older than his lifelong friend Fidel Castro, whose revolution he served for most of his adult life. Guevara had known Castro since the two were nineteen years old, when both men were attending the University of Havana, plotting together, as Guevara told me once, “to overthrow the government and make revolution.” While Guevara studied philosophy, literature, and theatre, Fidel studied law. The forties and fifties were a politically heady and volatile time in Cuba—a period of coups and fleeting democratic rule, and with both the left and right contending for power—and the University was an incubator for revolution. Their early student conspiracies failed, but in January, 1959, Castro, aged thirty-two and at the head of a guerrilla army, succeeded in ousting the Cuban dictator Fulgencio Batista, and seized power.

Three months later, at Fidel’s behest, Guevara founded the I.C.A.I.C., the Cuban Institute for the Arts and Cinematography, which sponsored Cuba’s state-funded, leftist “new” cinema under directors like Tomás Gutiérrez Alea, Humberto Solás, and Juan Carlos Tabío, who produced some of the revolution’s best-known early films, including “The Death of a Bureaucrat,” “Memories of Underdevelopment,” and “Lucía.” From then on, Guevara, as a leading intellectual and as Cuba’s preëminent “film czar,” remained faithful to Fidel Castro, and served as a behind-the-scenes advisor both to him and to his younger brother and successor, Raúl. In recent years, Guevara was best known to the outside world as the president of Havana’s annual film festival, held every December. He was an owlish, boy-faced bespectacled man who often dressed entirely in black, and often wore his suit jacket over his shoulders, like a cape.

Paradoxically, Guevara was also the preëminent homosexual in a Communist regime where, during the early years of revolution, being gay was regarded as a sign of decadent individualism, and homosexuality was brutally suppressed, complete with humiliating treatment in reëducation camps of the kind the late writer Reinaldo Arenas described in his memoir “Before Night Falls.” (In 1979, homosexuality was decriminalized, and in 2010 Fidel Castro apologized for the persecution, and, assuming historic responsibility for it, he blamed it on being distracted by the need to defend his government from the threats emanating from the C.I.A.) How exactly Guevara personally dealt with the worst period of repression was something he never made public, but in the eighties he spent a significant amount of time abroad, based in Paris; in 1983, while serving as Cuba’s ambassador to UNESCO, he was awarded France’s highest honor, the National Order of the Legion of Honor, by the Mitterand government, for his services to culture.

Back home in Cuba in the early nineties, following the Soviet collapse and the advent of Cuba’s hard-knocks “Special Period” of economic penury, Guevara resumed his role as the revolution’s film godfather. In 1993, he oversaw the production and release of the movie “Fresa y Chocolate” (co-directed by Alea and Tabío)—in which a gay Cuban man and a Communist party zealot overcome their differences and become friends—and helped usher in an era of gradual sexual glasnost. Afterwards, gay Cubans felt freer and less anxious about needing to conceal their sexual identity. By the early aughts, there were underground but officially tolerated “transformista” shows taking place in Havana, where transvestite entertainers performed tributes to their favorite divas, especially big-hair and big-voiced singers like Gloria Gaynor, Donna Summer, and Rocío Jurado. (In recent years, Raúl Castro’s daughter Mariela, a sexologist, took up the L.G.B.T. cause as well, helping to push through laws giving legal status and greater governmental protection to the L.G.B.T. community.)

In the past decade, Guevara regularly spent time in Spain, where an adopted son of his had taken up residence and, with his father’s help, had opened a restaurant. Privately, Guevara despaired about the lack of opportunity and choice for the young in Cuba. Several years ago, before Fidel fell ill in 2006, Guevara told me that he had urged him to ease up on the travel restrictions imposed on Cuban citizens, and to allow them more freedom. He feared that the old guard, his generation, were in danger of losing Cuba’s youth, and that many of these youth, in fact, were already lost to Cuba’s institutionalized revolution. “I am afraid that the revolution has not yet learned that the consciences of others do not need to be administered,” he told me. He said that Fidel was “agonized” about the problem of youth by his advancing years, and by the possibility that the socialist system he had overseen in Cuba might not survive him. “We achieved a lot,” said Guevara, “but we know we haven’t achieved everything we wanted.”

In the past two years, Raúl Castro, who has succeeded his older brother in power, has accelerated the pace of change, eliminating many of the more onerous and humiliating restrictions on Cubans. Now, Cubans can own cellphones, stay in hotels originally reserved exclusively for foreign tourists, buy and sell property, have a passport and travel abroad—and be openly gay. The Cuban Communist Party remains firmly in power, however. Guevara, throughout, kept a discreet public posture, never saying anything in public that might affect his ability to talk candidly to Fidel and Raúl. He was a force for change—social if not political—who stood permanently just off center stage.

Photograph: STR/AFP/Getty.