Egypt is more divided than ever. All sides — from Islamists to secularists — are headed to their corners, looking to be victors in the battle for power and refusing to make efforts to accommodate and compromise. If this continues, the country is in real danger of becoming the next Algeria. It should follow, instead, in Tunisia’s footsteps.

Recent events offer ominous signs. Reactions to the overthrow of president Mohammad Mursi, inside and outside Egypt, are simplistic. The picture is painted in black or white: The military’s action was either a coup against democracy or it was a move in defence of democracy.

But, rather than looking for someone to blame, Egyptians should realise that everyone lost the moment they stopped cooperating. Islamist and secular forces are trying to exclude each other at every turn. When the Muslim Brotherhood won democratic elections, it pushed through a constitution without winning a consensus, believing victory entitled it to carte blanche in policy decisions. It felt its electoral mandate gave it the right to change society’s behaviour. But, although Egypt is a conservative society, most people do not want their government to tell them how to behave when it comes to religion. More than ten million people poured into the streets — far more than the number of protesters that toppled Hosni Mubarak, the former president. Clearly, a significant portion of society felt excluded in the aftermath of the revolution two years ago.

The secular forces are behaving no better. Their parties and leaders set a dangerous precedent when they stopped trying to work with the Islamists in the democratic system, turning instead to the military — what is to stop others from doing the same next time they are unhappy?

And, at this critical stage, they are not doing enough to include the Muslim Brotherhood. Furthermore, with the army cracking down and rounding up hundreds of Islamists without clear charges, there will soon be no one left to talk to about how to address Egypt’s severe challenges and end the crisis.

Both Islamists and secularists are wrong if they think they can build a new Egypt on their own. There is no way the country can be successful if only one party rules. It should be clear to all that the transition was on the wrong track from the start. To avoid perpetuating this, all sides must stop antagonising each other and work together.

First, Egypt needs a bill of rights that enshrines basic principles. It must guarantee the right of every individual — regardless of religion — to work in government. It must guarantee the rights of minorities. And it must guarantee the peaceful rotation of power. As with the American constitution, no laws can be passed that go against its spirit.

The bill of rights can then be used to agree to a new, complete constitution. It must be based on consensus reached following negotiations including all sides, much like the one the Tunisians have created. It must not reflect the desires of only some. This is the only way to ensure no force will be able to exclude others or dictate norms of behaviour to Egyptian society.

All this must be done before elections are held. It is important to recognise, however, that just because Mursi has been deposed, it does not mean the Islamists are out of the game. While an Islamist candidate is unlikely to win a new vote for president, the Muslim Brotherhood and other Islamist parties are likely to be victors in any near-term parliamentary election.

At this point, Egypt has two possible paths. Either it follows the Tunisian route and establishes an inclusive coalition government, where tensions are still prevalent but progress is obvious; or it follows the Algerian route of deep polarisation and possibly civil war. Algeria’s glaring divide persists two decades after Islamists mounted a civil insurgency when they were denied a legitimate electoral triumph.

If secular forces assume a winner-takes-all position and Islamists refuse to learn from their mistakes, Egypt will be back to square one. Even if it maintains the status quo, it faces a continued deterioration of the political and economic situation.

The country still has the opportunity to choose its own destiny. But the only way for secularists and Islamists to find a way out of the crisis is together.

— Financial Times

Marwan Muasher, a former deputy prime minister of Jordan, is vice-president for studies at the Carnegie Endowment for International Peace.