Mohamed Morsi assumes a heavy responsibility when he swears the oath of office to become Egypt’s new president on Saturday. Mr Morsi is not just the country’s first civilian head of state. He is the Arab world’s first directly elected Islamist president. The continued momentum of the Arab awakening that shook the world 18 months ago now rests on Egypt’s ability to sustain its fragile democracy.

Mr Morsi’s swearing-in raises hopes that democracy can defy the forces of the “deep state” – a military and judiciary still tainted by the old regime. It is encouraging that the military council has acknowledged the clear democratic legitimacy that he enjoys as a result of his victory in the polls.

His inauguration alone cannot guarantee Egypt’s future, however. The generals accepted him with poor grace and the country rem-ains in constitutional limbo. Over the past two weeks the president’s powers have been severely curtailed by the generals in what has been described as a “soft coup”. This included the dissolution of an Islamist-dominated parliament and the generals’ decision to usurp legislative powers. The military has no intention of abandoning its self-appointed role as guarantor of Egypt’s secular state, while ringfencing its own privileges.

Mr Morsi’s Muslim Brotherhood shares some of the blame for these setbacks. It remains a secretive organisation that refuses to open its finances or membership to scrutiny. It broke its promise not to seek the presidency. And the parliament it led did not even attempt to address the serious problems facing Egypt’s crumbling economy. These failures, and Islamist attempts to dominate the drafting of the new constitution, helped to pave the way for the military’s intervention.

Mr Morsi might still turn the situation to his advantage. In his victory speech he made welcome gestures to all segments of Egypt’s divided society – including the security forces that for decades oppressed the Muslim Brotherhood. He has also promised to appoint an inclusive government. These are important signals. But they must be matched by actions to improve the lot of all Egyptians.

The new president should use what powers remain to him to implement the reforms that Egypt badly needs. This means taking decisions that will be politically difficult, such as eliminating costly subsidies that cripple the country’s budget. But he will also have to defy harder-line Islamist elements who believe that his victory is a mandate to roll back hard-won rights for women, Christians and other minorities.

With a broader government at his back Mr Morsi would find it easier to face down the generals and seek a new parliamentary election. But this will be possible only if he represents all of society.

Copyright The Financial Times Limited 2018. All rights reserved.