The deal, when they came, didn't appear at the last minute but well into extra time. In order to get Sudan and South Sudan to sit down and negotiate a settlement to their apparently intractable problems, the UN Security Council cajoled, threatened and finally set a deadline of last Saturday for a deal, before sanctions would be imposed on both countries.
And on Thursday, the deal on oil and borders were announced. The question now is whether two states, whose people have been at war for decades, can translate intent into lasting stability and peace.
In many ways it is a wonder that it took so long for a deal to appear, given that both countries are stronger in unity than in division. Indeed, they are poorer without each other: while the majority of oil production is located in South Sudan, the processing facilities and ports are located in Sudan. When South Sudan was unable to reach an agreement with the north over export fees, it shut down all oil production. Since that decision in January, the economies of both countries have been devastated, which should have focused minds on both sides of the disputed border.
Yet bad blood runs deep. South Sudan accuses its neighbour of arming rebels on its territory, while the north protests that militias in its restive regions are receiving support from Juba.
Under the terms of the deal, a demilitarised buffer zone will be set up at the border, until more detailed agreements are put in place. A financial package has been agreed upon, in part to compensate Sudan for the loss of oil fields to the south. Yet the deal does not outline clearly the resolution of oil revenue payments. Nor does it address border disputes or settle territorial disputes over Abyei and other flash points. Moreover, contested areas along the border region remain off limits to aid organisations, their access blocked because of continued fighting.
All of these oversights are unfortunate, and no doubt recipes for possible future unrest. The two Sudans need to resolve their issues transparently, for the sake of both their peoples and the wider region. Their economies remain fragile, and without a robust agreement, will continue to decline.
This weekend's agreement is at once an opportunity to be optimistic about the future, and realistic about the many points of friction that remain. For now, the prevailing sentiment is relief. The US president, Britain's foreign secretary and EU's foreign policy chief all praised the deals when they were announced in Ethiopia's capital Addis Ababa on Thursday.
It will take much more than promises to ensure today's optimism does not become tomorrow's excuse.