Roberto Micheletti, Honduras's de facto leader, has agreed a deal that could see Manuel Zelaya, the country's ousted president, returned to power if the measure is supported by congress and the supreme court.
The two sides have been at odds for four months over whether Zelaya should be reinstated before presidential elections due to be held in November.
"I am pleased to announce ... my negotiating team signed an agreement that marks the beginning of the end of the country's political situation," Micheletti said in a statement late on Thursday.
"With regard to the most contentious subject in the deal, the possible restitution of Zelaya to the presidency" would be included, he said.
Zelaya told Radio Globo: "Tomorrow [Friday] will be the day that the plan will be signed to restore democracy to the country."
The deal calls for the formation of a national unity government, a committee to ensure the veracity of the November 29 elections, and a truth and reconciliation commission.
The accord also asks foreign governments to reverse measures like suspending aid and cancelling the travel visas of coup leaders and the members of the de facto government.
Congress to decide
Antonio Rivera, a Honduran senator, told Al Jazeera the deal does not necessarily mean Zelaya will be reinstated as president.
"One-hundred and twenty-eight congressmen from five political parties are going to make the decision," Rivera said.
"Before that, congress is going to ask the opinion of the supreme court, the general attorney and the elections tribunal.
"Micheletti and Zelaya will have to accept the decision."
Zelaya, who was forced from power in June, and Micheletti held talks separately on Thursday with Tom Shannon, the US assistant secretary of state, and Dan Restrepo, Washington's special assistant for Western Hemisphere affairs.
Ian Kelly, a spokesman for the US secretary of state, dismissed claims that Washington had taken too long to force the Honduran rivals to reach a deal.
"I think we did see that the two sides had very hardened positions. We felt all along that this really needed to have a regional approach, so were were supporting the Organisation of American States and in particular President Oscar Arias of Costa Rica, who led the negotiations between the two sides," he told Al Jazeera.
"We do welcome the agreement - we see it as historic and an affirmation of the approach of engagement and inter-American dialogue that [US secretary of state] Clinton has been so supportive of."
Zelaya remains holed up at the Brazilian embassy in Tegucigalpa after re-entering the country in late September, two months after he was forced from the presidential palace and into exile.
As the US representatives met the Honduran rivals, a rally by hundreds of pro-Zelaya protesters in Tegucigalpa was broken up by police who fired tear gas.
Barack Obama, the US president, had faced criticism from human-rights groups who said Washington should do more to pressure Micheletti.
At one point in the crisis, Micheletti ordered restrictions on civil liberties to be imposed, during which time media stations supportive of Zelaya were taken off-air.
The resumption in negotiations on Thursday came a day after Honduras's military-backed government, which is not recognised internationally, lodged legal proceedings against Brazil at the International Court of Justice in The Hague.
The interim government accused Brazil of interfering in Honduras's internal affairs by sheltering Zelaya at its embassy, claims dismissed by the Brazilian government.
"The de facto Honduran government has no legitimacy to lodge a law suit in the International Court of Justice," a spokesman for Brazil's foreign ministry said.
Zelaya was forced from power on June 28, the same day that he planned to hold a non-binding referendum on the constitution that had been declared illegal by the Honduran congress and supreme court.
Opponents of Zelaya say that the public vote was aimed at winning support for an extension to presidential term limits, claims that he has denied.