Reuters reported that Qandil was a politically independent senior public servant in the Morsi administration, but was not popularly considered to be a likely candidate for the position of prime minister. Qandil was Egypt's youngest prime minister since Gamal Abdel Nasser's appointment in 1954. When Morsi was overthrown in a coup d'état by the military, Qandil after initially continuing in his role as prime minister until the formation of a new government, resigned from office on 8 July 2013 in protest over the killing of 61 protestors by the military at the Republican Guard headquarters. He was arrested on 24 December 2013 and released seven months later on 15 July 2014 after he was acquitted by the Court of Cassation, which accepted his appeal and annulled the one-year sentence against him.