Just a year after Mohamed Morsi's birth in 1951, Egypt's decades-long monarchy rule was overthrown in a military-led coup under Gamal Abdel Nasser.
Nasser would go on to pilot Egypt through a fitful transition into socialism, becoming a lasting symbol for the pan-Arab ideology unfurling across the region. Morsi would go on to join the Muslim Brotherhood, the very group that supported Nasser's revolution but then buckled under a crackdown once his government took office.
Initially a collaborator during the era of independence, the Muslim Brotherhood saw its members shunted into jail cells as Nasser's secular regime swung from tolerance to state repression in its treatment of the group.
But the Muslim Brotherhood, often regarded as one of the most important political organisations in the Arab world, survived the crackdown under Nasser, retaining a political buoyancy that kept it afloat throughout decades of regime change.
After Anwar Sadat took power and folded back on many of Nasser's socialist policies, the Brotherhood was once more eased into Egypt's political scene as a counterweight for the clout of Sadat's leftist rivals.
Having gained its re-entrance, the group cobbled together a significant popular base among Egypt's lower middle and middle classes and began seeking out backdoor channels of power.
Morsi came of political age among the Muslim Brotherhood generation that had protested on college campuses in the 1970's - a widespread student movement, and a foreshadowing of the Egyptian youth's role in the later 2011 revolution. The group formally adopted a mandate of democracy in 1995, and its influence leaked into professional work syndicates and circles of social welfare work.
"There was a generation of the Muslim Brotherhood that came of age in the late 70's and 80's that was far more engaged in society," said Abdullah Al-Arian, assistant professor at the Georgetown University School of Foreign Service in Qatar who specialises on modern Islamist movements.
"They believed that the best way to expand the organisation's mission was by filling certain necessary roles in society. They started schools, ran mosques, [and] ran medical centres," added Al-Arian, noting that gaps in government services allowed the organisation to extend its reach.
Yet Morsi was not among the group that demonstrated on college campuses and, later, posed an ideological challenge to the organisation's older, more insulated generation.
"He wasn't a student leader; he joined the Brotherhood relatively late," said Al-Arian. "Instead, he was what you might call a loyal member who deferred to the senior leadership, and because of his loyalty was rewarded through continuous promotion."
Later, Morsi was part of the cohort that wedged a space for the Muslim Brotherhood under Mubarak's government, earning himself a seat in Parliament in 2000. Once a secretive organisation, knitted out of the strong binds of mentor-disciple relationships, the Muslim Brotherhood was morphing into a multivocal political platform with an emphasis on social justice.
Under Mubarak, the Muslim Brotherhood enjoyed what scholar Mona el-Ghobasy calls "de facto toleration". Strict election rules made it impossible for MP candidates to run as independents, effectively tilting all the political clout to Mubarak's ruling National Democratic Party (NDP). 
Yet by making alliances with other parties, the group gained a substantial presence in Parliament and an even more substantial presence in Egyptian civic 
society, with leadership roles in local committees and professional unions. In these elections, Muslim Brotherhood candidates were favoured for their organisational prowess and their transparent management of syndicate finances.
But the Muslim Brotherhood occupied an uneasy space in Mubarak's regime, especially after it won a fifth of the country's parliamentary seats in 2005. Election fraud left the group with just 20 percent of seats, and denied Morsi another term in Parliament. When Morsi spoke out, participating in a demonstration that supported judges who wanted more independence, he was sentenced to jail for seven months.
Born in a conservative town on the Nile Delta, Morsi sketches an interesting political figure. He earned a PhD from a US university in California, headed the engineering department at one of Egypt's biggest universities, and his profile on the Brotherhood website boasts a consulting stint with the NASA space programme (perplexingly, Morsi later deniedever having worked there in a local TV interview).
Morsi has also taken strong stances on social practices he views as blasphemous.
In 2011, he led a boycott of a major Egyptian mobile phone company because its owner had tweeted cartoon depictions of Minnie Mouse in a face veil. 
Four years earlier, he had been tasked with helping author a position paper for the Guidance Council, the Brotherhood's ruling group. The final mandates included a ban on women and Coptic Christians from serving as president, as well as the formation of a council of Islamic scholars to advise Parliament on the law. Their role would be extra-constitutional, but non-binding.
By 2012, a newly-elected Morsi had refined his stance.
"I will not prevent a woman from being nominated as a candidate for the presidency," he told a New York Times reporter. "This is not in the Constitution. This is not in the law. But if you want to ask me if I will vote for her or not, that is something else, that is different."
The Muslim Brotherhood has always claimed to infuse society with a core Islamic ethic, adopting derisive stances on everything from Israel to beauty contests. Yet along Egypt's ideological expanse, they often inch towards the middle, flanked on the right by the more conservative Salafis.
Far from an ideological megaphone, the Brotherhood does not have a mission so much as an internal conversation - spun across generations - about the Islamic ethic and what kind of reach it should have in society. As power in Egypt's political arena shifted, so have the Brotherhood's ideological priorities.
"The [2011] revolution was a massive wake-up call," said Al-Arian. "The Brotherhood all of a sudden had to take much more concrete positions on things. The more concrete their positions became, the far more likely it was that they weren't going to impose these ideological stances."
Al-Arian highlighted the Brotherhood's approach to foreign policy. Staunchly opposed to Zionist policies, the Brotherhood had still maintained the Gaza blockade, despite easing border restrictions.
"This is not an organisation that at any point wanted to impose the hijab or draconian penalties," added Al-Arian. "The idea that they were going into government for a social revolution is unfounded."
The Brotherhood was navigating tricky political space when Morsi became the country's first democratically elected president in 2012. His successful campaign contradicted earlier claims by the Brotherhood that they would not run a presidential candidate.
When Morsi came to office, it was in the aftermath of a revolution, among a highly polarised population that gave him 51.7 percent of the vote.
According to Wael Haddara, one of Morsi's campaign advisers, the president appealed to a public desire for a more accessible, everyday man as leader.
"The counternarrative that Morsi wasn't a popular person, that Egypt needed a more charismatic figure, was not true... For the first four months, Morsi's popularity [ranking] was in the stratosphere," Haddara told Al Jazeera.
"He presented to people an accessible figure. A vast majority of Egyptians eking out a living, struggling to make ends meet, looked at Morsi as one of their own," he added.
When Morsi swore an informal oath in Tahrir Square, he opened his jacket before supporters to show he wasn't wearing a bulletproof vest. Upon taking office, one of his first decisions was to order the release of 572 prisoners that had been detained after the revolution by the army.
Morsi himself had been jailed during the 2011 uprising, before escaping in a mass prison break among other Brotherhood leaders and members of Hamas and Hezbollah.
One of Morsi's mistakes during his presidency was that he led people to assume that he'd taken the reigns of the state, when in fact he hadn't. He was simply put in a position to give people the idea that a real revolution had occurred. The state, meanwhile, was very much in the hands of the same people as it was under Mubarak