During the Cold War Cuba depended heavily on Soviet aid and took Moscow's side during the bitter ideological split between China and the Soviet Union.

But Sino-Cuban ties have warmed dramatically since the demise of the Soviet Union in 1991, and Cuba now sees China as an important trading and political partner.

"Even though the physical distance that separates China and Cuba is great, friendship between both people goes back a long way," Hu said during a visit to a Havana school with Raul Castro, the Cuban president.

With bilateral trade topping $2.6 billion a year, China is now Cuba's second most important trading partner after Venezuela.

During his visit the Chinese president also took time to meet Cuba's former leader Fidel Castro, who has not been seen in public since July 2006.

Cuban media released a photo of the pair shaking hands and chatting, but gave no details.

The picture showed Hu wearing a business suit while the former Cuban president wore a tracksuit that has become his standard uniform since undergoing emergency intestinal surgery more than two years ago.

The 82-year-old has an undisclosed illness and brother Raul Castro, five years his junior, formally succeeded him as president in February this year.