On 3 July 2013, an Egyptian appeals court upheld a verdict dismissing Qandil of his duties and sentenced him to one year in prison for not executing a court ruling to re-nationalize the Tanta Flax and Oil Company. Subsequently, on the same day, Morsi was removed from office in a coup d'état by the military. On 8 July 2013, Prime Minister Qandil resigned over the killing of 61 protestors by the military at the Republican Guard headquarters. He had initially decided to remain in his position as a caretaker PM until the formation of a new government. In late September 2013, the Cairo Misdemeanor Court upheld the sentence against Qandil and he was arrested on 24 December 2013. On 13 July 2014, the Court of Cassation accepted Qandil's appeal and abolished the verdict to imprison him for a year, to remove him from his job and to fine him 2,000 Egyptian pounds ($285). He was subsequently released on 15 July 2014.