The surprise encounter came at the opening ceremony of the Summit of the
Americas in Trinidad, where Mr Obama has made Cuba a key priority.
After several days of the US and Cuba trading warm words that have hinted at a
détente after a half century of hostility, Mr Obama said that he was seeking "a
new beginning" with Havana.
But it was his unexpected handshake and the smiles he exchanged with Mr Chavez
that caught many at the summit by surprise.
Mr Chavez's populist government in Caracas has sought to generate support by
railing against Washington at every opportunity. He once described President
George W Bush "the devil".
But he was warned by his fellow Latin American leaders last week that he must
tone down his anti-Americanism at the summit.
Asked what he had said to Mr Chavez, Mr Obama replied with a smile: "I
said como estas".
Mr Obama meanwhile made his diplomatic overtures to Cuba as he joined 33 other
leaders of Western Hemisphere states at the summit in Port of Spain in
Trinidad and Tobago late on Friday.
Only Cuba is not represented after being thrown out of the Organisation of
American States (OAS) in 1962.
But Mr Obama said: "The United States seeks a new beginning with Cuba. I
know there is a longer journey that must be travelled to overcome decades of
mistrust, but there are critical steps we can take toward a new day."
His comments came a day after Cuba's President Raúl Castro said that the
communist island state was ready to discuss "human rights, freedom of
the press, political prisoners - everything". Significantly, he
also acknowledged that the regime "could be wrong".
Mr Obama announced earlier in the week that the US was easing restrictions on
travel and remittances for Cuban-Americans and challenged Mr Castro to make
concessions of his own.
In his speech in Trinidad, Mr Obama renewed his promise for his administration
to engage with the Cuban government "on a wide range of issues",
including human rights, free speech, democratic reform, drugs, immigration
and the economy.
"Let me be clear: I am not interested in talking for the sake of talking,"
the president said. "But I do believe that we can move US-Cuban
relations in a new direction."
Earlier, the US Secretary of State, Hillary Clinton, also welcomed Mr Castro's
comments. "We welcome his comments, the overture they represent, and we
are taking a very serious look at how we intend to respond," she said.
In another sign of changing times, the OAS Secretary-General, Jose Miguel
Insulza, said he would ask the 34 member nations to invite Cuba back into
the fold. Mr Insulza is known for his political caution and is thought
unlikely to have floated the idea without the approval of Washington.
White House aides said Mr Obama had been particularly encouraged by Mr
Castro's concession that Cuba "could be wrong".
However, the White House spokesman Robert Gibbs made clear that while Mr
Castro's new openness to change was welcome, the US was not abandoning its
demand for Cuba to start making concrete moves toward greater freedoms.
"They're certainly free to release political prisoners," he said
aboard Air Force One as Obama flew into Trinidad. "They're certainly
free to stop skimming money off the top of remittance payments as they come
back to the Cuban island. They're free to institute a greater freedom of the