In a last-minute agreement, politicians in Haiti have agreed to institute a temporary government in an effort to prevent the country from falling into a power vacuum. Under the new agreement they will vote to elect a temporary president who will serve a term of 4 months.

The agreement just made it under the wire as current President Michel Martelly’s 5 year term ends this Sunday. There was no replacement for the president or method for one to be chosen before the agreement, though the current prime minister will remain in power until a replacement is chosen.

In the Haitian system the president is elected by majority run-off voting system, they must then choose an individual from the majority party in parliament to be prime minister. If there is no majority in parliament, the president will negotiate with the two houses of government and then must have their pick ratified by the parliament.

The process to replace the president was postponed for a third time last month over allegations of electoral fraud and violent protest eventually erupted from the opposition party as a result. The protesters were demanding the creation of an interim government so that a fresh electoral process could begin.