The fleeting exchange, captured in photographs and video from a giant soccer stadium in Johannesburg, came after Obama bounded up the steps towards the podium to address the massive crowd.
The United States and Cuba have seen their enmity outlive the Cold War that spawned it — even as Raul’s brother Fidel Castro, now in reportedly poor health, outlasted the decadeslong American embargo meant to push him from power.
The two countries have not had formal diplomatic relations since shortly after Fidel Castro led a 1959 revolution and aligned his country with the Soviet Union. Fidel passed the reins to Raul in 2008.
It was believed to be the first such encounter between the leaders of the two countries since Bill Clinton gripped Fidel Castro’s hand in 2000 at a United Nations lunch.
Shortly after the handshake, Obama delivered a speech honoring Mandela, also called Madiba, in which he seemed to take aim at governments like Castro's, saying: "There are too many leaders who claim solidarity with Madiba’s struggle for freedom, but do not tolerate dissent from their own people."