President Barack Obama said on Sunday that Brazil's emergence as a powerful democracy was an example other nations could follow, as young people in the West Asia and north Africa rebelled for greater freedom.
"As two nations who have struggled over many generations to perfect our own democracies, the United States and Brazil know that the future of the Arab World will be determined by its people," Obama said to a standing ovation at a historic theater in downtown Rio de Janeiro.
Obama has ordered US forces into the biggest military intervention in the Arab world since the 2003 invasion of Iraq, authorising strikes against Libya on Saturday as he met with Brazilian President Dilma Rousseff in Brasilia.
"We've seen the people of Libya take a courageous stand against a regime determined to brutalize its own citizens. Across the region, we have seen young people rise up," he told an audience of about 2,000 prominent Brazilians in a speech that was televised live across Brazil.
"When men and women peacefully claim their human rights, our own common humanity is enhanced... That is the example of Brazil," he said to loud applause in the ornate hall.
Obama also used the speech to stress that the United States sought a partnership of equals with Brazil, striking a chord that Brazilian officials were hoping for.
Rousseff took a tough tone during their joint appearance in Brasilia and dwelled on issues that divide them like trade tariffs and Brazil's aspirations for a permanent UN Security Council seat - a desire Obama expressed appreciation for but stopped short of endorsing.
In Rio the president deployed his formidable rhetorical skills to assure Brazilians he was not just interested in taking advantage of their country's economic boom, which has lifted more than 20 million out of poverty in the last decade.
"As you confront the many challenges you still face at home as well as abroad, let us stand together - not as senior and junior partners, but as equal partners," he said.
Obama, America's first African-American president, also stressed the multiracial and multicultural common ground that the United States and Brazil share and described it as a bond that should be exploited for mutual advantage.
"Together, we can advance our common prosperity," he said, citing trade and energy security, in a nod to Brazil's advances in biofuels and offshore oil finds.
"Our two nations face many challenges. On the road ahead, we will encounter many obstacles. But in the end, it is our history that gives us hope for a better tomorrow," he said.