The handshake between US president Barack Obama and Cuban leader Raul Castro at Nelson Mandela's memorial service could provide an opening for an easing of ties between the Cold War foes, analysts say.

However, others have cautioned that the significance of the brief encounter in South Africa should not be exaggerated, noting that courteous gestures do not necessarily translate into policy changes after 50 years of enmity.

"It's extraordinarily symbolic, and this opportunity must not be missed. Now the next step is to start talking," Cuban political scientist Esteban Morales told AFP.

"What happened is a sign that the two countries are ready to negotiate."

Peter Schechter, director of the Atlantic Council's Adrienne Arsht Latin American Centre in Washington, agreed but said the process could be a slow one.

He said the gesture was "perhaps a telling sign" that Mr Obama "may be willing to continue to implement small, incremental steps to engage with Cuba, even if it comes with spending some political capital."

But he also emphasised that Mr Obama had struck a "good balance" between openness and scepticism, by taking a swipe in his eulogy for Mandela at states like Cuba for claiming kinship with Mandela but eschewing his message of tolerance.

"The handshake came with finger-wagging," Mr Schechter noted.

The encounter at the stadium in Soweto between Mr Obama and Mr Castro involved the exchange of a few words, according to images broadcast on South African television.

Deputy US national security advisor Ben Rhodes told reporters on Air Force One that the handshake was not "planned" and that Washington still had "grave concerns" about the human rights situation in Cuba and the continued detention of American Alan Gross.

"The president's focus was on honouring the legacy of Nelson Mandela," Mr Rhodes said.

State media in Cuba reacts positively

In Cuba, the official Granma newspaper carried the photo of Mr Obama and Mr Castro in its online edition, without comment.

The government website Cubadebate.cu also ran a photograph of the moment with the caption: "Obama greets Raul: may this image be the beginning of the end of the US aggressions against Cuba."

The United States and Cuba have not had diplomatic relations since 1961, two years after Fidel Castro came to power in the Cuban revolution.

Tens of thousands of South Africans and scores of world leaders turned out to remember Nelson Mandela at Soccer City in Johannesburg. Read more.

Washington has imposed a strict embargo on the Communist-run island for a half-century, and Havana is on the US State Department's list of sponsors of state terrorism along with Sudan, Iran and Syria.

While Washington is incensed at the ongoing jailing of Gross - a State Department contractor who was sentenced to 15 years for crimes against the state - Cuba has railed constantly over the conviction of the so-called "Cuban Five" on espionage charges in 2001.

Nevertheless, Mr Obama has sought to lower tensions since taking office in 2009, easing restrictions on visas, remittances and travel.

Last month, speaking at a fundraiser at the home of a Cuban-American activist in Miami, Mr Obama said: "We have to continue to update our policies" toward Havana.

"Keep in mind that when Castro came to power, I was just born. So the notion that the same policies that we put in place in 1961 would somehow still be as effective as they are today in the age of the internet and Google and world travel doesn't make sense," he said.

Courtesies have occurred before, warns expert

Arturo Perez-Levy, a professor at the University of Denver, said the importance of "a simple handshake must not be exaggerated," recalling that former US leader Bill Clinton and Fidel Castro exchanged greetings in New York on the sidelines of a summit of world leaders in 2000.

Frank Mora, director of the Latin American and Caribbean Center at Florida International University, agreed.

"We should not read too much into this handshake. I don't think that it is a signal of rapprochement or a change in US politics nor a change in Cuba policy," Mr Mora said.

Analyst Jorge Gomez Barata said the Obama-Castro handshake was simply a result of "Mandela diplomacy" - and a testament to the example set by the anti-apartheid icon and South Africa's first black president.

"Mandela did not know that such a meeting was going to occur ... but he most certainly cleared a path that allowed for the avoidance of confrontation and created the basis for such an important meeting."