TEGUCIGALPA - Honduras' de facto government buckled under international pressure on Thursday and agreed to allow the return to power of President Manuel Zelaya, who was toppled in a military coup four months ago.

The breakthrough followed renewed pressure from senior U.S. officials who traveled to Honduras this week for a last-ditch effort to end a crisis that had handed President Barack Obama a foreign policy headache.

It is a triumph for Honduran democracy, the leftist Zelaya said after the rival sides agreed to a deal that could see him restored to office in the coming days.

Zelaya, a leftist, was toppled and sent into exile on June 28 but crept back into Honduras last month and has since been holed up in the Brazilian embassy.

De facto leader Roberto Micheletti, who took over the country within hours of Zelaya's ouster, had repeatedly refused to agree for his return but finally backed down.

I have authorized my negotiating team to sign a deal that marks the beginning of the end of the country's political situation, Micheletti, who took over as de facto leader after the coup, told a news conference on Thursday night.

He said Zelaya could return to office after a vote in Congress that would be authorized by the country's Supreme Court. He said the deal would require both sides to recognize the result of a Nov. 29 presidential election and would transfer control of the army to the top electoral court.

The United States, the European Union and Latin American leaders had all insisted that Zelaya be allowed to finish his presidential term, which ends in January. They had said they might not recognize the winner of the November election unless democracy was first restored.

A U.S. team led by Assistant Secretary of State Tom Shannon and Dan Restrepo, Washington's special assistant for Western Hemisphere affairs, sat in on talks earlier in the day and warned that time was running out to reach a deal.
Zelaya had angered many in Honduras by becoming an ally of socialist Venezuelan President Hugo Chavez. Critics also alleged he was seeking backing to extend presidential term limits, a claim he denies.

Human rights groups have documented major abuses by the de facto government and say free and fair elections would be impossible after Micheletti curbed civil liberties and temporarily shut down pro-Zelaya news organizations.

U.S. President Barack Obama cut some aid to Honduras after the coup but had been criticized by some Latin American for not doing more to force the de facto government to back down.

The collapse of talks last week prompted Secretary of State Hillary Clinton to dispatch the U.S. delegation to push again for a negotiated settlement.

(Additional reporting by Gustavo Palencia in Tegucigalpa; Writing by Jason Lange; Editing by Kieran Murray)