Politicians in Haiti have signed a last-minute agreement to install a transitional government that keeps the country from plunging into an immediate power vacuum
Under the new agreement, parliament will elect an interim president for a four-month term.
President Michel Martelly’s five-year term comes to an end on Sunday.
A run-off vote to replace him was postponed last month because of fears of violence and allegations of fraud.
The agreement is to be signed by the presidents of both chambers of parliament.
Prime Minister Evans Paul will remain in the post until parliament agrees his replacement.
Haiti’s runoff election is now scheduled for 24 April. The new president is due to sworn in on 14 May.
The agreement gives the troubled Caribbean nation an opportunity for a fresh start, after more than a year of political instability and violence.
But the situation remains delicate, warned Mr Martelly.
“We have to stay vigilant because certain people disagree with this accord,” he said.
On Friday, protesters beat a man to death in the capital, Port-au-Prince, in a clash with ex-soldiers.
Mr Martelly is constitutionally barred from seeking re-election but has thrown his weight behind Jovenel Moise, a banana exporter who won the first round of the presidential election in November.
But the result has been contested by the opposition challenger, Jude Celestin.
He accused the electoral authorities of favouring Mr Moise and threatened to pull out from the runoff vote.
Haiti’s Provisional Electoral Council has postponed the vote three times.
Whoever replaces Mr Martelly will face a daunting task.
Haiti is the poorest country in the Western Hemisphere.
It was devastated by a powerful earthquake in 2010 and its economy still relies heavily on foreign aid.