TWO years ago crowds of protesters in Tahrir Square persuaded Egypt’s army to take the side of the people and oust the dictator, Hosni Mubarak. The disruption that marked the second anniversary of the country’s revolution was of a far darker sort. On January 25th thousands demonstrating against President Muhammad Morsi and his Muslim Brotherhood clashed with the police in Cairo and other cities, leaving at least a dozen dead. Things worsened the next day, when at least 30 more people died in riots after a court in Port Said sentenced 21 people to death for their part in a football riot a year ago in which 72 fans had been killed. Mr Morsi imposed a month-long state of emergency in three of Egypt’s steamiest provinces, telling the army to take control (see article). The army chief’s loose talk of a state heading towards collapse fed rumours of unrest and disloyalty within the armed forces.

For the young, mostly secular, revolutionaries of Tahrir Square whom the West cheered on, things could hardly have gone worse. A little over a year ago the Islamist party that sprang out of the long-oppressed Muslim Brotherhood handsomely won a general election held in stages over several months; last June, with the Islamists still on top but already beginning to lose popularity, Mr Morsi narrowly won the presidency. Since then he has rushed through an Islamist-tinted constitution endorsed in a derisorily low turnout by only a fifth of eligible voters.

Mr Morsi has spent the past few months seeking to entrench his group’s power rather than building a consensus that might tackle Egypt’s most daunting problems. The country’s economy, as a result, is somewhere between paralysis and meltdown. Many of the 83m people in the Arab world’s most populous country are growing increasingly fearful and angry as their currency falls, prices rise and jobs get scarcer. He has insisted that the sitting upper house of parliament, which was elected by only a tenth of voters and had been seen by many as a talking shop, is the sole legitimate legislature, even as it writes rules empowering the Islamists, whose media spew forth sectarian hatred, claiming that anyone who rebukes them is an agent of foreign powers. The proceedings that led to the recent death sentences for the football hooligans were secretive. Meanwhile, not a single policeman has been jailed for killing any of the 800-odd people who lost their lives for protesting against Mr Mubarak’s dictatorship.

Hope to hold on to

A general election, already delayed, is scheduled for April. With Mr Morsi resorting to methods reminiscent of the old regime, the country could be torn further apart before then. The risk is that this surge of violence will tip Egypt into a new bout of revolution, or that the army, with or without Mr Morsi’s connivance, may reimpose a dictatorship.

Yet it is too soon to despair of Egypt’s future. The army, which has retained many of its privileges and powers under the new dispensation, has no wish to rule the country again; and it is both in Mr Morsi’s interests, and within his power, to govern by peaceful rather than violent means.

Instead of rushing to tighten their grip on power and demonise their opponents, the Brothers should grasp that legitimacy in democratic politics comes from inclusive rule and tolerance as well as from the ballot box. Mr Morsi should present himself as president of all Egyptians, whatever part they think Islam should play in public life. He should offer to revise the constitution’s most divisive parts and discuss altering the rules governing the coming election. He should begin to reform the police and the courts and appoint a genuinely independent public prosecutor rather than a Brotherhood stooge.

Above all, Mr Morsi should clinch a long-delayed deal with the IMF, which has promised a vital $4.8 billion in return for tough but crucial reforms, including the targeted removal of fuel subsidies. Economic reform, in turn, should prompt a surge of foreign investment. Indeed, Mr Morsi’s best hope of restoring the Islamists’ popularity is to revive Egypt’s miserably stalled economy.

The outside world can nudge him in the right direction. Although American military aid is a poor bargaining chip—its main purpose is to bind Egypt to its peace treaty with Israel—a threat by Europeans and others to withhold development aid could be a useful lever. But ultimately the foreigners’ clout is limited. The lesson of the past decade is that democracy cannot be forced down unwilling throats: only the Egyptians have the power to decide whether their country eventually fulfils the hopes of two years ago or reverts to darkness and violence. Mr Morsi has a heavy responsibility.