Former Egyptian President Mohamed Morsi has died after appearing at a court session in Cairo and fainting afterwards, Reuters reports. He was 67. According to The Washington Post, local Egyptian media is reporting he was stricken by a heart attack. Morsi was the first democratically elected president of Egypt, and took office after the toppling of Hosni Mubarak during the 2011 Arab Spring uprising. Morsi himself was overthrown by the Egyptian army in 2013 amid mass protests against his government. A top figure in the Muslim Brotherhood, Morsi was in custody since he was removed as president, and was since convicted of multiple offenses, including a three-year sentence for insulting the judiciary, a 20-year sentence for inciting the killing of protesters, and a 25-year sentence for espionage. He was on trial for espionage charges when he died on Monday.