When the Israeli offensive in Gaza draws to an end, little credit will be due to the UN Security Council, which has had a couple of odd moments in December and January.
The most recent is last week's resolution in which the Council appealed for an immediate and durable ceasefire. This was a cathartic exercise, but both parties to the ongoing conflict, Hamas and Israel, scorned it.
There is good reason for this. The reason can be found in resolution 1850, adopted a few weeks before, on 16 December 2008, before the crisis went into high gear. That is because it was an attempt to codify the policy that the international community seems to have sleepwalked into starting in January 2006 in reaction to the Hamas electoral victory.
Mahmoud Abbas had a remarkable early success in March 2005 when Hamas agreed to stop attacking Israel and to participate in the elections for the Palestinian Legislative Council.
These were substantial steps by Hamas, the most powerful Palestinian resistance movement, which had denounced Yasser Arafat's agreement to the Oslo accords and refused to participate in the elections for the first legislature in 1996. Some time before, Hamas leaders had begun to talk about a long-term arrangement to co-exist with Israel and thereby implicitly recognise it.
In September 2005 the international community gave its tacit blessing to the participation of Hamas in the elections in the face of the opposition of then Israeli leader Ariel Sharon.
Hamas is much more complex than simply a terrorist organization; it is a grievance-based resistance movement that thrives on the continuation of Israeli occupation, and it has a wide and plural following. It has become a formidable political player. They cannot be ignored in the search for peace with Israel.
And yet ignore them, and beyond, undermine them and sidestep them, is precisely what the international community has done since their election to a majority in the Palestinian legislature. Instead of reaching out and seizing a rare opportunity to bring a militant movement in from the cold and into the mainstream, the international community disregarded their initial steps in the direction of democratic rule and peaceful negotiations, punished the population in the hopes that they would oust their elected leaders, quashed efforts at reunification, and condoned Israeli policies which can only be seen as collective punishment. It should not surprise us that many in Hamas have interpreted this as meaning that there is no interest in a move by them toward democracy and peace, leaving no other recourse but continued armed struggle.
The Annapolis talks launched in November 2007, five months after the Palestinian schism, were an attempt to relaunch Abbas' political fortunes. For him to do so he would have had to demonstrate that, powerful evidence to the contrary notwithstanding, a viable Palestinian state was still within reach if he was in the lead. Of course no such evidence was produced because the talks were doomed from the start insofar as they attempted to exclude any say in them by Hamas.
And yet, on 16 December 2008, the Security Council went ahead and enshrined the exclusionary Annapolis approach that has kept Hamas out in the cold and ostensibly radicalized it. The Council has thus dealt itself out of the game and undercut its own credibility.
Many of the players who are currently in the region speak of dealing with "the Palestinian Authority" or the "legitimate Palestinian Authority" as represented by Mr Abbas. But Mr Abbas was elected in January 2005 for four years. The only part of the Palestinian Authority government in possession of any legitimacy left standing, and with one year to go before the end of its term, is the Legislative Council. So much for the rule of law, not to mention the prospects for a two-state solution.
And now the UN Secretary-General, Ban Ki-moon, flies to the region. In an emotional statement from New York announcing his trip he called for normal life to resume as the only path to peace. Resumption of normalcy is, of course, what Israel has been demanding since the intensification of Hamas rocket fire in December. But don't the Palestinians also have such a right? And can that right be exercised as long as occupation continues? One can take issue with the methods that some Palestinian militants use, and indiscriminate rocket attacks at civilians, however inaccurate and ineffective, are condemnable. But as long as the plight of the 70 per cent of Palestinians in Gaza, who are refugees from what is now Israel, is not addressed convincingly, it is just not realistic to expect them to sit quietly while their neighbours in southern Israel lead normal lives.
The Secretary-General might usefully consider whether his current activity won't remind Palestinians of his association, as part of the Quartet, with the policies that have led to the current pass.
The dramatic plight of the refugees is the overriding concern of the admirable and courageous humanitarian workers of UNRWA and other agencies and programmes in Gaza. There is an old refrain in the humanitarian trade: "first, do no harm." As the violence rages on, perhaps the political players active in the region could draw inspiration from that refrain. Before every step, they should ponder whether the policy under whose aegis they operate, as contained in Security Council resolution 1850, actually serves the cause of a durable and inclusive two-state solution to the Israeli-Palestinian conflict.
The writer was the chief UN Middle East peace envoy from 2005-2007