Daniel Ortega has been inaugurated as Nicaraguan president, two months after his convincing election victory.
Mr Ortega has returned to office after 17 years
The one-time revolutionary, who fought for almost two decades to return to power, was sworn in during a ceremony in the capital, Managua.
The Sandinista leader won November's presidential election pledging to fight hunger, poverty and corruption.
He has said he wants friendly relations with the US but he also has warm ties with some of its fiercest foes.
Many of the leftist Latin American leaders who have swept to power in recent years attended the ceremony, including Venezuela's Hugo Chavez, Bolivia's Evo Morales and Ecuador's Rafael Correa.
Cuba's Fidel Castro, too ill to personally attend the swearing in, sent a message of "utmost support" to Mr Ortega.
More than three-quarters of the population live on two dollars a day
Other regional leaders at the ceremony included Panama's Martin Torrijos, Costa Rica's Oscar Arias and Colombia's Alvaro Uribe.
Mr Chavez arrived in Nicaragua shortly after being sworn in for his third term in office, pledging "socialism or death" in his inauguration speech.
Bolivia's Mr Morales said: "Daniel Ortega's win gives strength and hope not only to Nicaragua but to all of Latin America."
Mr Ortega, 61, wore his trademark white shirt with the cuffs rolled up to his elbows during the ceremony in a square that he built when he was president of the country in the 1980s.
He was given the blue-and-white presidential sash from the speaker of Congress.
The BBC's Will Grant says Mr Ortega has changed considerably since he fought a civil war against the US-backed Contra rebels in the 1980s.
He is now a committed Christian and when Mr Chavez nationalised sectors of the Venezuelan economy earlier this week, Managua was quick to distance itself from such decisions for fear of upsetting foreign investors.
Mr Ortega, who ruled Nicaragua for 11 years after the 1979 Sandinista revolution, has promised to maintain economic stability and not to radically change economic policy.
He has also pledged to spend more on education and healthcare to improve the conditions of 80% of country's population who live on around $2 (£1.03, 1.54 euros) a day.