President Hugo Chavez and US Secretary of State Hillary Clinton shook hands and chatted briefly in a rare cordial encounter amid a diplomatic dispute that has left Venezuela and the United States without ambassadors in each other's capitals.
The handshake came as leaders were milling about at the inauguration of new Brazilian President Dilma Rousseff.
It was unclear what Mr Chavez and Mrs Clinton discussed.
Mr Chavez later described the interaction as a pleasant one, though he did not give much detail.
"We greeted each other," he told reporters at the Brasilia airport. "She had a very spontaneous smile and I greeted her with the same effusiveness."
In the past week, their governments have shown firmly entrenched stances as the United States revoked the Venezuelan ambassador's visa in response to Mr Chavez's refusal to accept the chosen US envoy.