HAVANA — Alfredo Guevara Valdés, a Marxist intellectual and ally of Fidel Castro who presided over Cuba’s powerful state-financed film industry and its many acclaimed movies for much of the Castro era, died here on Friday. He was 87.

The cause was a heart attack, Cuban state media reported.

Mr. Guevara had been a friend of Mr. Castro’s since their days together as politically active students at the University of Havana, where Mr. Guevara, a member of the Communist Youth, was studying philosophy and Mr. Castro law.

The two were involved in turbulent student politics aimed at ousting Cuba’s corrupt leaders, and they were together during the Bogotazo, the deadly riots in the Colombian capital of Bogotá in 1948 that were said to have been a crystallizing event for Mr. Castro. Some believe it was Mr. Guevara’s knowledge of Marx that helped put Mr. Castro on the path to communism.

Mr. Guevara was later arrested and tortured by the police during the struggle to overthrow the Cuban strongman Fulgencio Batista. He was one of a small group of insiders who mapped radical reforms in the months after Mr. Castro came to power, in 1959.

Mr. Guevara studied theater direction and worked with the Cuban filmmakers Tomás Gutiérrez Alea and Julio García Espinosa on “El Mégano,” a 1955 film about charcoal workers that is considered the first modern Cuban documentary. While Mr. Castro was fighting in the Sierra Maestra, Mr. Guevara was in Mexico, where he worked with Luis Buñuel on the 1959 movie “Nazarín.”

After Castro took power, Mr. Guevara spent more of his career stewarding the movie industry than making films, becoming a recognizable figure in Havana in his large-framed spectacles, cravats and the jacket that he wore on his shoulders like a cape.

Mr. Castro, who saw cinema as a tool of mass education and as a means of creating a national consciousness, appointed Mr. Guevara to create the Cuban Institute of Cinematographic Art and Industry, known as Icaic, which used generous state financing to become a virtual film monopoly and the most influential cultural institute on the island.

“Cinema was the medium par excellence, and Fidel was aware of this,” Mr. Guevara said in an interview with The Associated Press in 2009. “Television for the direct message, cinema to stimulate reflection and to disquiet.”

Icaic set up mobile cinemas using mules, boats and trucks to bring movies to remote villages. It produced and distributed a weekly newsreel, documentaries and as many as a dozen feature-length films a year. Mr. Guevara also established a sound studio that became the cradle of a new Cuban music, nueva trova, and oversaw the advent of the bold silk-screen movie posters that became identified with Cuban film.

Under Mr. Guevara, Icaic produced Cuban classics like Mr. Alea’s “Memories of Underdevelopment” (1968) and Humberto Solás’s “Lucía” (1968), as well as “Now” (1965), a documentary about race in America by Santiago Álvarez.

“Alfredo was a vanguardist,” said Enrique Pineda Barnet, a prominent Cuban filmmaker. “He changed the cultural panorama of our country, in cinema, in music, in art.”

Image

Alfredo Guevara in 2009.CreditJose Goitia for The New York Times

A committed Fidelista, Mr. Guevara nevertheless insisted that art should not be subservient to politics.

“Propaganda may serve as art, and it should,” he was quoted as saying. “Art may serve as revolutionary propaganda, and it should. But art is not propaganda.”

Filmmakers credit Mr. Guevara with fending off censors and overseeing films that criticized Mr. Castro’s Cuba. He was at the center of fierce debates between artists and communist ideologues, clashing with Blas Roca, a powerful member of the Communist Party leadership, in the early 1960s in a public row over the role of culture in politics.

“He had to confront a lot of polemic,” Mr. Pineda Barnet said. “And if a polemic didn’t find him, he went looking for it.”

Some viewed Mr. Guevara as overly cautious in his desire not to provoke the censors, while others considered him a savvy judge of the political mood who held back movies that he believed would rock the boat too much.

“One of his great abilities was knowing how to navigate these complex waters,” said Dean Luis Reyes, a Cuban film critic.

Some filmmakers said Mr. Guevara played favorites and criticized him for constructing a slow, bureaucratic production system that left virtually no space for young filmmakers or independent productions.

“His greatest error was not opening space for other voices,” Mr. Reyes said.

Mr. Guevara left Icaic in 1982 and spent nine years in Paris as Cuba’s representative at Unesco, the United Nations educational, scientific and cultural organization. He returned to Icaic in 1991 and remained with it for almost another decade.

Mr. Guevara founded the International Festival of New Latin American Cinema in Havana in 1979 and was its president at his death.

“Alfredo strove to create a new cinema not only for Cuba, but for all of Latin America,” said Miguel Barnet, president of the Union of Cuban Writers and Artists. “He created a new vision of the world: more critical, more realistic.”

Mr. Guevara was born in Havana on Dec. 31, 1925. His father was a railroad engineer. He is survived by a son, Antonio, and two grandchildren, the film festival office said.

State media said that Mr. Guevara’s body was cremated on Saturday and that his ashes were spread on the broad steps of the University of Havana, where he and Mr. Castro had forged their bond.

A version of this article appears in print on , on Page A24 of the New York edition with the headline: Alfredo Guevara Valdés, 87, Steward Of Cuban Cinema and an Ally of Castro. Order Reprints | Today’s Paper | Subscribe