Haiti has made a firm and important first step in taking responsibility for its affairs after decades of external interference. An agreement, reached on the night of February 5, twenty-four hours before the Presidency of Michel Martelly ended in accordance with the Constitution, was as historic as it was vital.

As I said in a report to the Permanent Council of the Organisation of American States (OAS) on a Special Mission I led to Haiti from January 31 to February 6, prior to the February 5 agreement, "Haiti faced - in very stark and real terms – a situation of potential chaos".

On the ground, these are the realities that confronted the country:

President Martelly was demitting office in 7 days with no elected successor, and no agreed mechanism for how the country would be governed; political actors were jockeying for power, making agreement on a mechanism for an interim government extremely difficult; there was tension, uncertainty and simmering conflict; and the existing amended 1987 Constitution made no provision for a transitional government.

In this troubling scenario, there was no legal answer and no space for an externally-imposed "solution". A way out of the morass had to be a political compact, made by the main Haitian players; it had to be one that they owned or there would be no chance for its implementation.

Of course, there were many claimants for the role of who should agree the way forward for Haiti. In the Presidential election, which was suspended in January because of politically-organized violence, there were 54 candidates for the Presidency. But, the first round held last October had resulted in two candidates securing 58.08 % between them. That left 52 losers for whom, as I told the OAS Permanent Council on February 12, "blaming the (elections) process as a whole is an irresistible magnet". Nonetheless, despite their overwhelming rejection by the electorate, many of the 52 candidates have remained active, with a few not averse to dispatching their followers to the streets for protests.

The two "winners" of the first round of the October Presidential electoral contest were Jovenel Moise of PHTH (Martelly's party) with 32.81 % and Jude Celestin of LAPEH with 25.27 %. As to be expected, Celestin led the chorus of the disappointed Presidential contenders who alleged "massive fraud", although none of the independent observers of the elections agreed. All the international observer groups concurred on many irregularities that were not sufficient to materially affect the first-round election result.

The second-round, scheduled for December was postponed to January following demands by many of the candidates, led by Celestin, for changes in the process. But, even after changes were made, Celestin declared he would not contest the election. However, he did not withdraw his name formally. In the event, organized violence led to the second-round being suspended.

On the eve of Martelly's departure, therefore, the country was faced with a crisis to which the existing Constitution provided no answer. Potentially it would be anarchy since no government would be in place. The judges of the Supreme Court themselves revealed to the OAS mission that I led that the answer to the problem was not legal; it had to be political but as close to the Constitution and the law as possible.

Recourse to a solution therefore resided in the only two institutions of government that were in existence with legitimate authority. Those were: Martelly, who was still constitutionally the President, and the National Assembly embodied by its President Jocelerme Privert. That is why these two constitutional entities were encouraged to find and agree on a solution that would take the country over the immediate obstacle of a Constitutional vacuum, following Martelly's departure without an elected successor, and would establish a mechanism for choosing an Interim President and an Interim Prime Minister to superintend the country's affairs with a clear road map to the election of a new President by an agreed and certain date.

They did so at the 11th hour and after much debate, mind-changing, and interventions by vested interests. For instance, some persons, who would no longer command authority once Martelly demitted office, were encouraging him to continue in office after February 7 and until a new President could be elected. Had Martelly remained in office one day past February 7, a political fire of protests would have been lit that could have engulfed Haiti and retarded any hope of progress for decades. The cost to Haiti and its neighbours would have been beyond contemplation. The OAS is right to be satisfied with the friendly but impartial role it has played in Haiti, always at the request of its government.

The agreement, signed on the night of February 5 by Martelly, Privert and the President of the Lower Chamber of the National Assembly, Chozler Chancy, was imperative. As I said to the assembled Haitian negotiators, immediately after they signed the agreement in the Presidential Palace, they had "written their names in an important page of Haiti's history, showing the world that they are capable of making mature decisions in a democratic way that would redound to Haiti's benefit".

The terms of the agreement have been met and are being implemented. Martelly demitted office properly with a passionate address to the National Assembly, and the Assembly agreed on the election of an Interim President – Privert – in a process that took less than 24 hours through spirited debate and bargaining. As I write, nominations for the Interim Prime Minister are being discussed and should be settled shortly.

Haitian decision-makers have taken a crucial first step toward a sustainable democracy. Achieving it will not be painless, not least because it is all too easy for political losers to seek advantage by organising street demonstrations. Further, without a history of debate and decision-making within solid governmental institutions, democratic processes will be severely tested, and it will be up to the Haitian leaders to put the interests of their country first.

All this is more complicated because of Haiti's poor economic circumstances. Its GDP per capita is $820, less than one-tenth of the Latin American average. Sixty percent of the population lives below the poverty line and the richest 20% accounts for 62% of the income. Shockingly, of the population of more than 10 million people, only 500,000 are in permanent employment. This situation is exacerbated by the expulsion by the Dominican Republic of Haitians who found work or were born in that country.

The Haitian leaders deserve every commendation and encouragement for the mature manner in which they have tackled their constitutional and political crisis. After the installation of a new, democratically-elected President, they will need to do much more, including reform of the Constitution, judiciary, electoral system and the system of maintaining law and order. In that way, they will encourage the countries of the Americas to help them help themselves.

(Sir Ronald Sanders is the Chairman of the Permanent Council of the Organisation of American States and Ambassador of Antigua and Barbuda)

Responses and previous commentaries: www.sirronaldsanders.com