The agreement, signed by the presidents of both chambers of Parliament, keeps the country from plunging into an immediate power vacuum upon Martelly's exit, after an election to choose his replacement was postponed because of fears of violence, among other problems.
In light of the annulled vote, which would have occurred on January 24 and given the country time to put a new leader in power, Parliament will elect an interim president, with a term of up to 120 days, the four-page agreement said.
"On Sunday morning we will hold a joint session of Parliament to note the end of President Martelly's term and to ask the prime minister and government to remain in office to settle current affairs," Senate President Jocelerme Privert told AFP.
"The election of the interim president will take place later," he said, without giving a date.
The country's runoff election is now scheduled for April 24, with the new, permanent leader to take power on May 14.
Since 1986, when president-for-life Jean-Claude "Baby Doc" Duvalier fled a revolt, the Caribbean island nation, which is wracked by poverty and the after effects of a devastating 2010 earthquake, has struggled repeatedly to hold credible elections.
