Venezuela's President Nicolas Maduro speaks during a meeting with representatives of the United Nations (U.N.) at Miraflores Palace in Caracas, March 15, 2016. REUTERS/Carlos Garcia Rawlins

HAVANA (Reuters) - Cuba honored Venezuelan President Nicolas Maduro with its highest state honor on Friday in an act of defiance two days before U.S. President Barack Obama is due for a historic visit to Havana.

Cuban President Raul Castro pinned the medal, known as the Order of Jose Marti, on Maduro in a show a solidarity between socialist allies that have stood together against the United States since Maduro’s predecessor, the late Hugo Chavez, came to power in 1999.

Maduro paid repeated homage to Chavez and former Cuban leader Fidel Castro, the president’s brother, as well as to the independence heroes of each country, Simon Bolivar and Marti, names that serve as a rallying cry against interference from foreign powers.

“This strength of Marti, of a dignified and steadfast Cuba that stands tall, I will take with me to the people of Venezuela in recognition of their heroism,” Maduro said.

Chavez emulated and befriended Fidel Castro, coming to the aid of a Cuban economy in collapse after the fall of the Soviet Union by providing oil on favorable terms. Fidel Castro resigned in 2008, when his younger brother took over.

Since Chavez died in 2013, Maduro has continued to aid Cuba with Venezuelan oil in exchange for missions by Cuban doctors and nurses in the South American country.

When Obama arrives on Sunday, it will mark the first visit to Cuba by a U.S. president in 88 years. Obama’s visit will last until Tuesday.

Despite major ongoing differences, Obama and Raul Castro ended more than half a century of U.S.-Cuban estrangement in December 2014 and restored diplomatic relations last year.