Morsi’s Freedom and Justice Party, created by the Muslim Brotherhood, secured a plurality, and the two major Islamist blocs together received roughly two-thirds of the vote. In June 2012, Morsi defeated his rival Ahmed Shafik, Mubarak’s final prime minister, by a margin of 52-48% to win the presidency.