CAIRO — Egypt’s military rulers on Sunday officially recognized Mohammed Morsi of the Muslim Brotherhood as the winner of Egypt’s first competitive presidential election, handing the Islamists both a symbolic triumph and more clout in their power struggle with the country’s senior generals.
Morsi, 60, an American-trained engineer and former lawmaker, stands ready to become the first nonmilitary figure to lead Egypt in generations. But 16 months after the military took over at the ouster of President Hosni Mubarak, Morsi’s victory is an ambiguous milestone in Egypt’s promised transition to democracy.
Hundreds of thousands of Egyptians crowded into Tahrir Square, the epicenter of last year’s uprising, to celebrate the news. They generally conceded that Morsi’s recognition as president does little to resolve the larger standoff between the generals and the Brotherhood over control of the government and the future constitution.
After a week of doubt, delays, and fears of a coup since a public ballot count showed Morsi ahead, the generals have shown a measure of respect for at least some core elements of electoral democracy. They have accepted a political opponent over their ally, former general Ahmed Shafiq, after a vote that international monitors said was credible.
But with just days to go until their promised exit from power by June 30, the generals shut down the democratically elected and Islamist-led Parliament; took over its powers to make laws and set budgets; decreed an interim constitution stripping the new president of most of his power; and reimposed martial law by authorizing soldiers to arrest civilians.
And the generals gave themselves an effective veto over provisions of a planned permanent constitution as well.
In his first televised speech, Morsi on Sunday steered clear of the political confrontation, and called for unity among Egyptians. He tried to reassure minority Christians, who mostly backed Shafiq because they feared Islamic rule.
Morsi said he carries ‘‘a message of peace’’ to the world and pledged to preserve Egypt’s international accords, a reference to the peace deal with Israel.
He also paid tribute to the nearly 900 protesters killed in the uprising. ‘‘I wouldn’t have been here between your hands as the first elected president without . . . the blood, the tears, and sacrifices of the martyrs,’’ he said.
As recently as Sunday morning the capital was tense with fears that the panel of Mubarak-appointed judges overseeing the vote would declare Shafiq president, completing a full military coup. Banks, schools and government offices closed early for fear of violence in the streets.
Protesters massed in Tahrir Square for a sixth day of a sit-in demanding the military roll back its power grab.
The throngs hushed as transistor radios in the square began broadcasting the election commissioner’s announcement of the official results. The square erupted as the numbers came through: Morsi had won 51.7 percent of the runoff vote.
‘’Morsi, Morsi!’’ the crowd chanted. ‘‘Down, down with military rule!’’ Small fireworks went off over the crowd, beaming Brotherhood supporters streamed in, swelling the crowd to perhaps 100,000 by nightfall.
Israel congratulated Egypt on its election, but official reaction there was subdued. I
n Gaza, however, where the Brotherhood-allied Hamas faction is predominant, wild celebrations broke out.
President Obama called Morsi to congratulate him and offer continued US support for Egypt’s transition to democracy, the White House said.
Senator John Kerry praised Egyptians for following through with their first free presidential election since the ouster of Mubarak.
“This is an historic moment for them in their postrevolutionary period, and it’s an Egyptian moment just as it’s been an Egyptian revolution,’’ the Massachusetts Democrat said in a statement.
Kerry, chairman of the Foreign Relations Committee, was among the first in Washington to call for Mubarak to step down during protests last spring.
Kerry said he recently met twice with Morsi in Cairo and they discussed Egypt’s economic woes. According to Kerry, the new president also had vowed to protect the rights of minorities and women and pledged to maintain his country’s special relationship with the United States.
After 84 years as an often outlawed secret society struggling in the prisons and shadows of monarchs and dictators, the Brotherhood is now closer than ever to its stated goal of building an Islamist democracy in Egypt.
But the Brotherhood’s leaders immediately pledged to continue the sit-in, and fight on in the courts and in the streets to restore the Parliament. I
n his statement, Morsi vowed to take his oath of office before the seated Parliament and not before the Supreme Constitutional Court as the generals have decreed.
Field Marshal Mohamed Hussein Tantawi, the chairman of the military council, congratulated Morsi. The Brotherhood’s political arm said on its website that the official presidential guard, who previously served Mubarak, had arrived at Morsi’s home to begin protecting him. It was a stark contrast from the days less than two years ago when the arrival of armed officers at the home of a Brotherhood leader invariably meant a trip to one of Mubarak’s jails.
Fulfilling a campaign pledge to represent all Egyptians, Morsi resigned from the Brotherhood and its political arm, the Freedom and Justice Party.
State news media reported Sunday morning that the prime minister and Cabinet would resign immediately, making way for Morsi to appoint his own team.
Morsi has pledged to name a prime minister and other officials from outside the Brotherhood as part of a unity government.
At the same time, however, Morsi has campaigned not as an individual with a vision of his own but rather as an executor of the Brotherhood’s platform.
Morsi has vowed to carry out the program that Khairat al-Shater, the Brotherhood’s political strategist, spent more than a year devising to reform and remake Egypt’s government ministries.
Morsi and Shater have never effectively dispelled assertions that Shater would wield the true power in a Morsi government.
Information from Globe wire services was included in this report.