Today is a day of mourning and prayer for former South African President Nelson Mandela in his native country, and around the world millions reflect on his influence and reach across the globe.

Mandela's outlook was broad, accepting and forgiving, but his affection for Cuba and its controversial leader, Fidel Castro, didn't settle well with the United States.

Considered "two of the world's most recognized symbols of defiance and longevity," Mandela and Castro forged an unexpected bond and shared a common thread -- nationalist and anti-imperialist ideologies - and the Cuban Revolution's triumph in 1959 inspired Mandela.

"We are in the presence of one who is truly a marvel of work and intelligence," Castro said in a public appearance with Mandela (during a three-day visit to Cuba that coincided with the 38th anniversary of the start of the Cuban revolution), the Washington Post reported in 1991.

The beloved former South African President and anti-apartheid crusader had more in common with Castro than one might think.

"The South African leader's nationalist and anti-imperialist stances collided head on with the world's superpower and gave him a lot in common with its Cuban archenemy. Mandela embraced the former Cuban dictator because he opposed apartheid and represented the aspirations of Third World nationalists that the United States undermined across the globe during the Cold War," the Huffington Post reports.

In 1991, in a ceremony marking the anniversary of his 1953 attack on the Moncada barracks, the opening shot of the Cuban revolution, Castro awarded Mandela the Order of José Marti, Cuba's highest civilian honor. José Marti was a Cuban poet and revolutionary who fought for Cuban independence from Spain (1853-1895).

Mandela, "charged with the task of starting a guerrilla army in 1961", was drawn to Cuban Communist writings -- including the works of Castro, Che Guevara (the Communist guerrilla leader and later Minister of Industry and head of Cuba's National Bank who died in battle in Bolivia) and Mao Tse-tung, a Chinese communist revolutionary, politician and socio-political theorist.

Cuba, under Castro's reign, opposed apartheid and supported the African National Congress -- Mandela's political organization and the current ruling party. Castro also attacked "Washington for having backed South Africa's white-minority government and apartheid system of racial separation".

"Mandela credited Cuba's military support to Angola in the 1970s and 1980s with helping to debilitate South Africa's government enough to result in the legalization of the ANC in 1990," the Huffington Post adds. "The U.S. government, on the other hand, reportedly played a role in Mandela's 1962 arrest and subsequently branded him a terrorist -- a designation they only rescinded in 2008. In 1986, President Ronald Reagan vetoed the Anti-Apartheid Act."

According to the Washington Post, more than 300,000 Cubans served in Angola between 1975 and 1991, when the Cuban withdrawal was complete, and more than 2,000 of them were killed there.

After being released following almost three decades behind bars, Mandela shortly set out for Cuba to "express his gratitude, calling Castro's Revolution 'a source of inspiration to all freedom-loving people'."

"We admire the sacrifices of the Cuban people in maintaining their independence and sovereignty in the face of a vicious, imperialist-orchestrated campaign," Mandela said during the visit, the Los Angeles Times reported. "We, too, want to control our own destiny. The most important lesson that you have for us is that no matter what the odds, no matter what difficulties you have had to struggle under, there can be no surrender," he added. "It is a case of freedom or death."

Mandela urged Castro to come and visit South Africa, which was frowned upon by the Cuban exile community in the U.S., most of whom fled Castro's dictatorship in the early 1960s.

With that said, Mandela didn't receive a warm or official welcome when he came to speak against apartheid in Miami in 1990. In fact, five Cuban-American mayors signed a letter criticizing him for his pro-Castro comments. According to the Miami Herald, in response, black leaders boycotted the Miami tourist industry until 1993.

While critics both in the U.S. and around the world "have suggested that Mandela has misspent some of his moral capital by meeting with such leaders as Castro, Palestine Liberation Organization Chairman Yasser Arafat and Libyan President Moammar Gadhafi," that didn't deter him from nurturing his warm relationship with Cuba. Mandela, who died Thursday at the age of 95, was adamant about never "turning his back on those who had opposed apartheid."

In 1994, Castro attended Mandela's inauguration as South Africa's first black president.

"If you ask any Cuban who Mandela is, they will place him among the greatest men who have ever lived," Havana journalist Maria Elena Calderín told TeleSur.