Fidel Castro has made a rare public appearance, speaking to school children about his brother's late wife and revolutionary figure Vilma Espin.

The 89-year-old former president regularly writes reflections in the state media and meets with dignitaries but seldom appears in public. His last appearance at a public event was in July 2015.

Wearing a white sports jacket and speaking in a scratchy voice, Castro told a room of students and teachers that Espin would be happy to see the fruits of her sacrifice at schools like theirs.

"For those of us who are here we consider it a privilege to be in this school today because this type of school is getting close to a kind of dream," he said.

Castro was later shown shaking hands with children while seated and wearing a black baseball cap.

The revolutionary leader did not make any remarks about last month's visit to Cuba by President Obama in televised portions of the visit aired Thursday evening on Cuban state news media.

Castro wrote a 1,500-word essay in response to Obama's trip in his only statement about the U.S. leader's visit to date, reminding Cubans about a long history of U.S. aggression against the island and stating "we don't need the empire to give us any presents."

Castro stepped aside in 2006 after suffering a serious illness and officially retired two years later, but his presence still casts a long shadow on Cuban government and society.

Espin was married to Castro's brother and current president, Raul. She fought alongside the Castro brothers during the revolution against dictator Fulgencio Batista. She later founded the Federation of Cuban Women and served as Cuba's de facto first lady for decades. She died in 2007.