MANY doubted it would ever happen, so first and foremost we should welcome the delayed results of the Egyptian presidential elections as a victory for democracy.

For many voters, including secularists, some ethnic and religious minorities and many women, the choice between a leader of the Muslim Brotherhood and a former president backed by the Egyptian military elite, was about the lesser of two evils. The low turn-out (50%) and the slender majority for Mohamed Morsy (with 51.73% of the vote) reflects that.

Nevertheless, this is a momentous event in the slow revolution that has rolled around the Middle East and North Africa for more than a year. Not only is Mr Morsy the first truly democratically-elected president of Egypt, he is the first Islamist in the Arab world to come to power through the ballot box. It would have been disastrous for them and their country if the generals had opted to manipulate the vote in their own favour because it would have turned the Brotherhood into political martyrs, which would have stoked extremism. Instead, they will be forced to live with the inevitable accommodations and compromises that come with political power.

Beyond this, the eventual significance of their victory remains uncertain. The military has exploited the interregnum to mount what bears all the hallmarks of a soft military coup. It has dissolved the new parliament, retaken sweeping powers of arrest and awarded itself a key role in the drafting of a permanent constitution. Because of their huge economic power in Egypt, the military elite was never going to relinquish power willingly. And in truth, many Egyptians who fear instability and islamisation are quietly pleased the army is limiting the power of the presidency, but the generals need to know that there is no going back to pre-Tahrir Square days.

The challenge for Mr Morsy, who immediately quit his position in the Brotherhood, is to follow through on his rhetoric about building bridges with other faith groups, including Coptic Christians, and racial minorities, such as the Nubians. His party strikingly failed to do that in the country's embryonic parliament, despite promises of inclusiveness. The challenge for foreign governments, particularly the US, is to support the Egyptian people's democratic choice and use foreign aid to ensure that the military does not hobble him. Grand speeches about democracy ring hollow when, as in Gaza, elections produce a result they dislike and reject.

As the most populous Arab state and the place where the Arab spring burst into bloom, what happens in Egypt has regional implications. Egypt's democratic revolution may be messy and confusing but it is still alive. That is good news.