The new Egyptian President, Mohammed Mursi, faces immense challenges on the domestic front, having inherited a politically divided country with a heavy legacy of corruption, poverty, rampant unemployment and security problems.
Externally, Egypt's new leader will also encounter a number of serious challenges, the most prominent of which are relations with Israel, the US and Iran. Here is a look at some of the most pressing issues.
The Mursi-Shafiq battle in the runoff has left Egypt politically divided, as reflected in Mursi's narrow victory.
More than 12 million voters decided to support Mubarak's last prime minister. This represents a challenge to Mr Mursi who will now have to embark on serious steps towards national reconciliation.
Building bridges with those who voted against him, particularly liberals and Copts, appears to be an immediate priority.
"No-one can run a country while knowing that half of the country is not with him," political analyst Hasan Abu-Talib told Nile News TV on 24 June.
In this context, Mr Mursi will also have to dissociate himself from the Muslim Brotherhood and prove that he is indeed "a president for all Egyptians".
Relations with the Supreme Council of the Armed Forces (Scaf) will likely be a thorny issue for Mr Mursi.
As the presidential runoff started, the Scaf issued a supplementary constitutional declaration which has cut down much of the president's powers.
The Scaf has given to itself temporary legislative powers following the dissolution of parliament, and has secured complete control over all army affairs, including the defence budget, the appointment of commanders and the extension of their service.
The president can declare war, but only after the approval of the Scaf.
Under the new declaration, the Scaf will also form a new constituent assembly, should the current one be scrapped by the court looking into lawsuits filed against it.
On the domestic front, Mr Mursi has two equally important issues on his plate: security and the economy.
Despite a recent slight improvement, public security has deteriorated since the 25 January revolution. There has been a rise in killings, abductions and car theft, amid widespread possession of weapons.
Also, working with the security apparatus that has for decades clamped down on his group will be a difficult challenge for the new president.
Equally challenging is the domestic economy. More than 40% of Egyptians live below the poverty line. The country's economic situation has generally worsened since the revolution.
The withdrawal of investments, the closure of a large number of factories and persistent strikes in various sectors have taken their toll on the economy.
More than half of Egypt's foreign reserves have already been eroded.
Prior to Mr Mursi's victory, concern had been voiced in Egypt that a win for the Muslim Brotherhood's candidate could have a negative effect on relations with the Gulf as some states there may not be happy about a Brotherhood candidate being at the helm.
In March, statements by Muslim Brotherhood spokesman Mahmud Ghuzlan caused tensions with the United Arab Emirates and other Gulf states.
Mr Ghuzlan was reported to have made hostile remarks about the UAE after Dhahi Khalfan, the Dubai police chief, said he would ask Interpol to issue a warrant to arrest well-known cleric Yusuf al-Qaradawi. Al-Qaradawi had accused the UAE of deporting Syrian activists and their families from the Gulf state.
The Gulf Co-operation Council spokesman at the time described Mr Ghuzlan's remarks as "irresponsible", as such comments "could impact relations between Egypt and the rest of the Arab region."
Following Mr Ghuzlan's statement, Mr Khalfan also accused Muslim Brotherhood supporters in the UAE of using social media to stir up opposition to the Gulf's ruling elite.
Relations with Israel and the US are among the most difficult challenges facing Mr Mursi.
As a pragmatist, he will likely be keen to respect the peace treaty with Israel and maintain good relations with the US and the West.
In his first televised address, he emphasised that he will honour all international treaties and agreements signed by Egypt.
The challenge here will emanate from the fact that many Egyptians, including the Muslim Brotherhood itself, used to accuse the Mubarak regime of being subordinate to the US. If Mr Mursi does not visibly change Egypt's policy in this regard, this will very likely cast a negative impact on his image at home.
Mr Mursi's stance on Iran is another important issue. For decades, Egypt's former governments have steered clear of opening up relations with Iran.
In recent years, there have been fears of growing Shia influence in the Arab world, and attempts to penetrate Egypt. Although Al-Azhar and the Salafists in Egypt worry about any Shia presence in Egypt, the Muslim Brotherhood's stance on Iran has always been positive.
Mr Mursi has reportedly told the Iranian news agency Fars that he is looking forward to strengthening relations with Iran "to create a strategic balance in the region" – although a spokesman for Mr Mursi denied that he had done an interview with Fars.
Any efforts by Mr Mursi in this direction may face opposition at home and have implications abroad, in the light of the stance adopted by the US, Israel and the West against Iran.
Relations with the Nile Basin countries will be another important task for Mr Mursi. He will need to build bridges between Egypt and these states in order to resolve the issue of sharing the waters of the Nile.
BBC Monitoring selects and translates news from radio, television, press, news agencies and the internet from 150 countries in more than 70 languages. It is based in Caversham, UK, and has several bureaux abroad. For more reports from BBC Monitoring, click here