CAIRO (AP) — He spent time in jail during the Hosni Mubarak regime, but not as long as some fellow Islamists. He is well-educated, having studied at the University of Southern California, yet still betrays his rural roots. He rose through the ranks of the once-banned Muslim Brotherhood as a lackluster but loyal foot soldier.

Now, Mohammed Morsi has made history in breathtaking fashion, becoming the first Islamist to rise to the presidency of the most populous Arab nation.

Aiming to defuse anxieties among large numbers of Egyptians who fear an Islamic agenda, Morsi said, “I am a president for all Egyptians.”

Morsi also borrowed phrases used by Abu Bakr, the first Muslim ruler after the 7th century death of the Prophet Muhammad, saying, “If I don’t obey God in serving you, you have no commitment to obey me.”

Sunday’s announcement by the country’s electoral commission capped a political standoff that tested the nerves of not just Egyptians but many around the world.

The US-trained engineer who rode some improbable twists and turns in Egypt’s 16-month transition to democracy is an enigma: Despite his education, he sometimes struggles to communicate in public and can be off-putting to some secular elites.

The bespectacled and bearded Morsi squeaked to victory in the freest election in Egypt’s history, and now the 60-year-old university professor must prove his mettle by standing up to the ruling generals who in recent days have stripped the presidency of real power.

For 35 years, Morsi obediently followed the Muslim Brotherhood’s strict rules, abiding by the principle of unquestioned obedience to its supreme leader — a position that changed hands five times during that period and currently is held by Mohammed Badei.

Morsi has dutifully mirrored the group’s strategy of couching a hardline doctrine with short-term pragmatism. In an example that looms large now that he has been elected, Morsi is anti-Israel but he does not call for annulling Egypt’s 1979 peace treaty.

His history makes clear he will not be the comfortable interlocutor for Israel that Mubarak was. His first active role in the Brotherhood was through membership in an “anti-Zionist” committee in his Nile Delta province of Sharkiya in late 1980s, promoting rejection of normalization with the Jewish state. Brotherhood officials have said he will not meet with Israelis, but also will not prevent other officials from doing so.

Morsi helped build the Brotherhood constituencies in Nile Delta provinces at a time the group’s meetings were held in secret, away from the eyes of security forces that waged crackdowns and sent thousands to prison for “belonging to prohibited group” during Mubarak’s three-decade rule. To this day, the 84-year-old organization relies on a disciplined network of cadres backing a leadership whose strategies are formulated behind closed doors.

Unlike other group members who spent years in prison, Morsi was only detained for eight months in 2008 along with 800 Brotherhood members for showing solidarity with independent judges. He was also rounded up along with 34 other Brotherhood members in the first few days of the 2011 uprising. He says he fled the prison with the help of people who helped demolish its walls.

Morsi, who served in the parliament, is said to have never been the ideas man in the Brotherhood. Instead, he served as an implementer of policy. Critics say Morsi is solidly part of the hard-line wing of the Brotherhood that has shown little of the flexibility or willingness to compromise. Throughout his rise in the group, Morsi has been closest to the two figures who are now the Brotherhood’s powerful deputy leaders, Mahmoud Ezzat and Khairat el-Shater.

“Morsi has no talents but he is faithful and obedient to the group’s leaders, who see themselves as above the other Muslims,” said Abdel-Sattar el-Meligi, a former senior Brotherhood figure who broke with the group, particularly because of el-Shater’s grip on the organization. “Morsi would play any role the leaders assign him to, but with no creativity and no uniqueness.”

As a result of this reputation, Egyptians widely assume Morsi’s presidency will be unofficially subordinate to the Brotherhood’s strongman and chief strategist, el-Shater, who was the group’s first choice for president. But he was disqualified by election authorities because of his prison conviction during the Mubarak regime. Morsi served only as a backup candidate, earning him the unflattering nickname, “Spare Tire.”

Morsi showed some savvy by adjusting his campaign. During the first round in May, Morsi promised implementation of Islamic Shariah law and campaigned next to clerics, seeking to rally his group’s base and as well as other Islamists. “The day will come when the Sharia of the truth is put into effect,” he said in one TV show.

But when the race boiled down to a runoff with Mubarak-era politician Ahmed Shafiq, Morsi tacked to the center. He went after the secular vote by switching his slogan to “Our strength is in our unity,” and calling himself “the candidate of the revolution.” Recent posters showed him with a priest and a woman not wearing a conservative headscarf.

Morsi comes from Edwa, an impoverished village in the Nile Delta province of Sharqiya, where his home is built of the simple, unpainted red brick. His relatives wear the galabeya robes traditional in the countryside. His 50-year-old wife, Naglaa Ali, is a housewife who dresses in traditional Islamic veil that cloaks half her body — a sharp contrast to Mubarak’s modern-dressing wife, Suzanne.

Just before his first victory speech, he was caught on camera talking on his cellphone — apparently calling home — saying, “Tell everyone, I’m going to be on TV.”

He excelled in primary and secondary schools and then joined the school of engineering and quickly became a member of teaching staff of Zaqaziq University in his home province. Morsi went to the United States where he obtained a doctorate at USC. Unlike many, he chose to return to Egypt and taught in his local university from 1982-85, in precision metal surfaces.

Morsi says he wants to overhaul Egypt’s corrupt and inefficient government agencies and repair the economy. But the Brotherhood may have little chance to implement anything from its agenda: In recent days the military council has disbanded the Islamist-dominated parliament and grabbed sweeping powers that leave the president with little authority over important policy. The question now is whether he will play a leading role in taking on the generals and reversing these decrees, as supporters demand.

Copyright 2012 The Associated Press.