Leftist Xiomara Castro was sworn in Thursday as the first woman president of Honduras, vowing to reform the crime- and poverty-stricken nation into a "socialist and democratic state."
Castro, 62, took the oath at a massive ceremony attended by international dignitaries after an embarrassing week of infighting in her Libre party that challenged her authority.
She said she was inheriting a "bankrupt" country which she intended to reshape into a "socialist and democratic state."
Honduras's public debt is about $17 billion.
The oath was sworn before Judge Karla Romero, flanked by Castro's choice of Congress president, Luis Redondo, who draped the presidential sash over his new boss before a crowd of some 29,000.
The guests included US Vice President Kamala Harris, King Felipe VI of Spain and Taiwan Vice President William Lai.
- '12 years of struggle' -
"Twelve years of struggle, 12 years of resistance. Today the people's government begins," Castro said on Twitter Thursday.
But the lead-up to the swearing-in was marred by a disruptive rivalry within her Libre party, which is in a majority alliance in Congress.
Libre factions split on who should be the legislature's new president, coming to blows in the Congress chamber and then holding rival inaugural sittings.
Castro accused supporters of Redondo's rival for the Congress presidency, Jorge Calix, of being in cahoots with the PN and other forces she said wanted to undermine her anti-corruption drive.
Juan Orlando Hernandez of the PN, her predecessor, is accused by US prosecutors of protecting drug traffickers in exchange for bribes.
- 'Everyone wants to leave' -
Castro assumes office with a full load of tasks ahead of her.
Hondurans are fleeing the country in droves, often to the United States, in search of work and a better life.
Castro spoke of a poverty rate of 74 percent, a figure she said "in itself explains the caravans of thousands of people of all ages fleeing to the north -- Mexico and the United States -- looking for a place and a way to survive in spite of the risk to their lives" from gangs and smugglers along the way.
"Everyone wants to leave because there's no work. If there were more job opportunities here, there would be no need to look for another country," university student Jensi Davila told AFP in Tegucigalpa.
Adding to the exodus, Honduras's murder rate is nearly 40 per 100,000 inhabitants.
Among the crowd celebrating Castro's inauguration, seamstress Esther Lopez expressed hope that the situation "is going to change, because Xiomara has been supporting the cause of the poor for many hears and because of (her husband Manuel) 'Mel' Zelaya, who was a good president."
- Migration talks -
US Vice President Harris urged Castro to fight corruption, seen as a root cause of Central American migration, in talks after the inauguration ceremony.
Harris, the first foreign official to have a bilateral meeting with Castro, welcomed the priority the new president had placed "on countering corruption and impunity, including her intent to request the assistance of the United Nations in establishing an international anti-corruption commission," said a readout from Harris's office.
Castro needs international support to renegotiate a foreign debt of some $11 billion.
It is an issue, according to former prime minister Edgardo Paz, which requires agreement "with the multilateral institutions where Washington has a lot of influence."
Harris said her visit would be an opportunity to boost cooperation on key issues "from the fight against corruption to economic recovery."
Castro will also meet Lai, though separately, "to exchange views on issues of mutual concern," according to Taiwan's foreign ministry.
Honduras is one of just 14 countries to recognize Taiwan.
China, which considers Taiwan a part of its territory, has spent decades successfully encouraging its allies to switch sides.
On the election campaign, Castro vowed to "immediately open diplomatic and commercial relations with mainland China" if she won.
Castro announced part of her cabinet Thursday, with her son Hector Zelaya as private secretary and Jose Manuel Zelaya -- her husband's nephew -- as defense minister.
Honduras has no law against nepotism.