Title: List of elections in 2012
Content: 2012 Egyptian presidential election 
Title: 2012 Egyptian presidential election
Content:  Presidential elections were held in Egypt in 2012, with the first round on 23 and 24 May 2012 and the second on 16 and 17 June. The 2012 Egyptian Presidential election was the first and so far the only democratic presidential election of Egypt’s history. The Muslim Brotherhood declared early 18 June 2012, that its candidate, Mohamed Morsi, won Egypt's presidential election, which would be the first victory of an Islamist as head of state in the Arab world. It was the second presidential election in Egypt's history with more than one candidate, following the 2005 election, and the first presidential election after the 2011 Egyptian revolution which ousted president Hosni Mubarak, 
Title: 2012 Egyptian presidential election
Content:  42% of the vote, while the remaining three secular candidates won 56% of the vote. Candidates Shafik and Moussa held positions under the Mubarak regime and won 35% of the vote, while Sabahi was a prominent dissident during the Sadat and Mubarak regimes. Following the second round, with a voter turnout of 52%, on 24 June 2012, Egypt's election commission announced that Muslim Brotherhood candidate Mohamed Morsi had won Egypt's presidential elections. Morsi won by a narrow margin over Ahmed Shafik, the final prime minister under deposed President Hosni Mubarak. The commission said Morsi took 51.7% of the vote versus 48.3% for Shafik. Morsi was sworn in on 30 June 2012.
Title: History of Egypt
Content:  The first round of a presidential election was held in Egypt on 23 and 24 May 2012. Mohamed Morsi won 25% of the vote and Ahmed Shafik, the last prime minister under deposed leader Hosni Mubarak, 24%. A second round was held on 16 and 17 June. On 24 June 2012, the election commission announced that Mohamed Morsi had won the election, making him the first democratically elected president of Egypt. According to official results, Morsi took 51.7 percent of the vote while Shafik received 48.3 percent. On 8 July 2012, Egypt's new president Mohamed Morsi announced he was overriding the military edict 
Title: 2012 Egyptian presidential election
Content:   On 24 June 2012, Egypt's election commission announced that Morsi had won the run-off. Egypt's benchmark stock index celebrated Morsi's election by closing up 7.6 percent, its largest single-day gain in nine years.
Title: Post-coup unrest in Egypt (2013–2014)
Content:  Presidential elections were held in mid-2012. No candidate garnered as much as a quarter of the vote in the first round of elections. The top two candidates advanced to the runoff: Mohamed Morsi of the Freedom and Justice Party, the candidate of the Muslim Brotherhood, and Ahmed Shafik, an independent candidate who served as prime minister of Egypt under Mubarak. Morsi strongly criticized the Mubarak regime and offered a vision for Egypt as an Islamic democracy, while Shafik, a secularist, promised to restore order. Morsi ultimately prevailed in the runoff, defeating Shafik by a margin of 3.5 percentage points. While Islamists hailed Morsi's election with enthusiasm, many Copts and liberals viewed the runoff as a choice between two 
Title: Egyptian Crisis (2011–2014)
Content:  In June 2012, presidential elections were held and Mohamed Morsi allegedly won 51.7% of the vote versus 48.3% for Ahmed Shafik. President Morsi, a leading member of the Muslim Brotherhood and the Freedom and Justice Party (FJP), resigned from both organizations and took office on 30 June 2012. This marked the end of the Supreme Council of the Armed Forces transition period. Of note is that on 14 June 2012, just 2 days before the second round of the presidential elections, the Supreme Constitutional Court of Egypt, who was not changed since appointment by the Mubarak regime, issued a judgement to dissolve the parliament that was elected after 
Title: 2012 Egyptian presidential election
Content: Abdullah Alashaal, previous foreign minister assistant, retired ambassador. Authenticity Party nominee. ; Mahmoud Houssam, as an independent with the support of 30,000 voters. President of the Beginning Party. ; Houssam Khairallah, Democratic Peace Party nominee. ; Mohammad Fawzi Issa, Democratic Generation Party nominee – withdrew on 16 May 2012 in favor of Amr Moussa. However, his name remained on the ballot paper as the official date of withdrawal had already passed. The remaining candidates are: 
Title: List of presidents of Egypt
Content:  chairman of the Supreme Council of the Armed Forces, Field Marshal Mohamed Hussein Tantawi. Mohamed Morsi took office on 30 June 2012, after being elected by the presidential election held on 23–24 May and 16–17 June 2012. He was deposed by the Egyptian Armed Forces in a coup d'état on 3 July 2013, following massive protests calling for his resignation. He was succeeded by Adly Mansour, the head of the Supreme Constitutional Court of Egypt, as Acting President. Mansour was sworn into office in front of the Supreme Constitutional Court on 4 July 2013. Current President el-Sisi took office on 8 June 2014, after being elected by the presidential election held on 26–28 May 2014. He was re-elected by the presidential election held on 26–28 March 2018.
Title: 2012 Egyptian presidential election
Content: Ahmad Awad Al-Saidi, National Party of Egypt nominee. ; Mortada Mansour, previous Zamalek SC chairman. National Party of Egypt nominee. ; Ibrahim El-Gharib, as an independent with the support of 30,000 voters. ; Mamdouh Qutb, previous director general of the Egyptian General Intelligence Directorate, Civilisation Party nominee. ; Houssam Khayrat, Egyptian Arab Socialist Party nominee. ; Ashraf Barouma, Quiver Party party president. 

Question: who won the presidential election in egypt 2012?
Answer: Hosni Mubarak.