Honduras ended months of political turmoil as it swore in a new president Wednesday, turning the page on a thwarted quest by ousted leader Manuel Zelaya to be restored to power after a coup that drew international condemnation.

Conservative rancher-turned-President Porfirio Lobo said the first thing he would do was escort Zelaya from his refuge at the Brazilian Embassy to the airport, where the deposed leader planned to board a flight to the Dominican Republic and start a new life in exile.

Dozens of soldiers stood guard outside the embassy Wednesday while many more troops managed a five-block radius of roadblocks.

Zelaya, who was ousted in a dispute over changing the Honduran Constitution, said he would leave the Central American country as a private citizen under a deal signed by Lobo and Dominican President Leonel Fernandez.

The left-leaning Zelaya insisted he was still president up until the moment his four-year constitutional term officially ended Wednesday.

The inauguration marked a quiet end to his tumultuous struggle to return to power after soldiers stormed his residence June 28 and flew him out of the country in his pajamas.

"He's done. I think at this point, if you are Zelaya, you slink away into the corner and you recoup for a little while," said Heather Berkman, a Honduras expert with the New York-based Eurasia Group. "But I think in the near term, Zelaya is finished as a politician."

The country's institutions moved quickly this week to put the coup behind.

A Supreme Court judge found six generals innocent of abuse of power charges for ordering soldiers to hustle Zelaya out of the country at gunpoint. And Congress voted to approve amnesty for both the military and Zelaya, who had been charged with abuse of power and treason over his defiance of a Supreme Court order to cancel a referendum on changing the constitution.

Zelaya, however, is still under investigation for embezzlement in connection with $1.5 million in government funds.

Opponents said Zelaya wanted to hold onto power by lifting a ban on presidential re-election, as his ally Venezuelan President Hugo Chavez did. Zelaya denies that and says he only wanted to give more voice to Honduras' many poor and shake up a stagnant political system dominated by a few wealthy families.

Zelaya slipped back into Honduras in September, hiding in the trunk of a car. He turned up at the Brazilian Embassy to the dismay of interim President Roberto Micheletti and the delight of hundreds of supporters who followed the ousted leader into the diplomatic mission and vowed not to leave until he was restored to power.

As U.S.-brokered talks dragged on and ultimately failed to reverse the coup, the supporters slowly went home. Zelaya urged his backers not to show up at the embassy or stage protests Wednesday, saying he wanted to leave quietly.

"It would interfere with the process of my exit and would complicate things for me," he told Radio Globo from the embassy, where he and his wife slept on inflatable mattresses.

An aide has said Zelaya would likely take up residence in Mexico, but the ousted leader has given no details about his plans.

Wednesday's inauguration also put an end to Micheletti's coup-installed government, which resisted months of international pressure to restore Zelaya to office, including the suspension of U.S. development aid and anti-narcotics cooperation.

Micheletti bet that international insistence on Zelaya's return would fade after the Nov. 29 presidential election won by Lobo. It largely worked.

Some left-led Latin American countries, including Brazil and Venezuela, insisted that recognizing the election outcome would amount to condoning a coup in a region that has long struggled to install stable democracies.

But the United States, by far the largest source of direct foreign investment in Honduras, argued Hondurans had the right to choose their next leader in a regular election that had been scheduled long before Zelaya's ouster. More and more Latin American countries have taken that stance.

On Tuesday, President Mauricio Funes of neighboring El Salvador, himself a leftist, announced the upcoming restoration of diplomatic ties with neighboring Honduras after Lobo takes office.