Tuesday's memorial service for Nelson Mandela generated some informal diplomacy and political controversy, alongside the praise for the late South African president.
In a moment caught by television cameras, U.S. President Barack Obama shook hands with Cuban President Raul Castro as he walked to the podium.
The handshake was notable because the United States and Cuba have not had diplomatic relations since 1961, at the height of the Cold War, and the U.S. maintains a trade embargo on Cuba. Relations have begun to thaw in recent years.
U.S. officials say the handshake was not pre-planned. But they say the two leaders did not have a substantive discussion, they only exchanged greetings. White House aides say the United States still has "grave concerns" about Cuba's human rights situation.
Obama also exchanged greetings with Afghan leader Hamid Karzai, but U.S. officials say Obama did not see the memorial service as a "venue to do business."
The two leaders have been debating an agreement of a continued U.S. troop presence in Afghanistan after foreign forces withdraw in 2014.
The United States says Karzai must sign the pact by the end of this year or there will be no choice but to withdraw all American troops after 2014.
Obama is popular in South Africa, and thousands of people in the stadium cheered when his image appeared on the giant screen overlooking the field.
In contrast, South African President Jacob Zuma was booed each time his image was shown on the screen. Many South Africans have been angered by recent accusations that Zuma spent 200 million rand ($25 million) in taxpayer money to renovate his private home.
In all, more than 70 heads of state and government attended the ceremony, including British Prime Minister David Cameron, French President Francois Hollande, Zimbabwe's President Robert Mugabe and India's President Pranab Mukherjee.
Correction: An earlier version of this story indicated that South African President Jacob Zuma is accused of using $200 million in taxpayer money on home rennovations. He is accused of using 200 million rand, or $25 million dollars, to rennovate his home.
Some information for this report was provided by AFP.