When Muslim Brotherhood leader Mohamed Morsi broke out of an Egyptian jail during Hosni Mubarak's final days in office in 2011, he never imagined he would end up behind bars again.
Less than three years later, the deposed president's trial on charges of inciting violence, that began on Monday, could land him in prison for the rest of his life, or worse.
Morsi, who was ousted on July 3 after massive countrywide protests against his rule, and 14 other top leaders of Muslim Brotherhood are facing charges of murder and violence at the Ittihadiya presidential palace clashes in December 2012.
After decades of repression under Egyptian autocrats, the Muslim Brotherhood won every election since a popular uprising toppled Mubarak in 2011, eventually propelling Mursi to power. If found guilty, Morsi and 14 others could face lifetime imprisonment or the death penalty.
The U.S.-trained engineer's victory in the country's first free presidential election broke a tradition of domination by men from the armed forces, which had provided every Egyptian leader since the overthrow of the monarchy in 1952.
The euphoria that greeted the end of an era of presidents who ruled like pharaohs did not last long.
Morsi promised a moderate Islamist agenda to steer Egypt into a new democratic era where autocracy would be replaced by transparent government that respected human rights and revived the fortunes of a powerful Arab state long in decline.
The stocky, bespectacled Mursi told Egyptians he would deliver an "Egyptian renaissance with an Islamic foundation".
Instead, he alienated millions who accused him of usurping powers, imposing the Brotherhood's conservative brand of Islam and mismanaging the economy, all of which he denied.
The son of a peasant farmer was something of an accidental president, thrown into the race at the last moment by the disqualification on a technicality of millionaire businessman Khairat al-Shater, by far the group's preferred choice.
Morsi is a civil engineer and lecturer with a doctorate from the University of Southern California. He has spoken of a simple childhood in a village in the Nile Delta province of Sharqia, recalling how his mother taught him prayer and the Koran.
While in power, Morsi made