Updated 11:28 PM ET
(AP) CAIRO - The Muslim Brotherhood declared early Monday that its candidate, Mohammed Morsi, won Egypt's presidential election, which would be the first victory of an Islamist as head of state in the stunning wave of protests demanding democracy that swept the Middle East the past year. But the military handed itself the lion's share power over the new president, sharpening the possibility of confrontation.
With parliament dissolved and martial law effectively in force, the generals issued an interim constitution making themselves Egypt's lawmakers, taking control over the budget and granting themselves the power to determine who writes the permanent constitution that will define the country's future.
But as they claimed victory over Hosni Mubarak's last prime minister Ahmed Shafiq after a deeply polarizing election, the Brotherhood challenged the military's power grab. The group insisted on Sunday that it did not recognize the dissolution of parliament or the military's interim constitution or its right to oversee the drafting of a new one.
That pointed to a potential struggle over spheres of authority between Egypt's two strongest forces. The Brotherhood has campaigned on a platform of bringing Egypt closer to a form of Islamic rule, but the military's grip puts it in a position to block that. Instead any conflict would likely center on more basic questions of power.
In a victory speech at his campaign headquarters, Morsi clearly sought to assuage fears of a large sector of Egyptians that the Brotherhood will try to impose stricter provisions of Islamic law. He said he seeks "stability, love and brotherhood for the Egyptian civil, national, democratic, constitutional and modern state" and made no mention of Islamic law.
"Thank God who led successfully us to this blessed revolution. Thank God who guided the people of Egypt to this correct path, the road of freedom, democracy," the bearded, 60-year-old U.S.-educated engineer declared.
He vowed to all Egyptians, "men, women, mothers, sisters, laborers, students ... all political factions, the Muslims, the Christians" to be "a servant for all of them."
"We are not about taking revenge or settling scores. We are all brothers of this nation, we own it together, and we are equal in rights and duties."
Final official results are due on Thursday, and the Shafiq campaign challenged the Brotherhood's victory claim, saying it was "deceiving the people." A campaign spokesman on the independent ONTV channel said counting was still going on with 19 of 27 provinces completed and Shafiq slightly ahead so far.
The Brotherhood's declaration was based on results announced by election officials at individual counting centers, where each campaign has representatives who compile the numbers and make them public before the formal announcement. The Brotherhood's early, partial counts proved generally accurate in last month's first round vote.
The group said Morsi took 51.8 percent of the vote to Shafiq's 48.1 percent out of 24.6 million votes cast, with 98 percent of the more than 13,000 poll centers counted.
At their campaign headquarters, the Brotherhood officials and supporters were ebullient over the turn of fate: The fundamentalist group that was banned for decades and repeatedly subjected to crackdowns under Mubarak's rule now held the chair that their nemesis was ousted from by last year's 18 days of mass protests. The uprising was launched by secular, leftist young activists, joined only later by the Brotherhood's leadership as millions took to the street, seeking an end to the authoritarian, corrupt regime.
Now some in Brotherhood were ready to challenge the generals. "Down with military rule," the supporters chanted.
The Arab Spring uprisings have brought greater power to Islamists in the countries where longtime authoritarian leaders were toppled but Egypt is the only one to have an Islamist president. The Islamist Ennahda party won elections in Tunisia for a national assembly and it leads a coalition government, but the president is a leftist. Libya's leadership remains in confusion and there is no president, though Islamists play a strong role, and an Islamist party is part of the coalition government in Yemen.
The question now will be how a Brotherhood president will get along with the military generals who have ruled since Mubarak fell on Feb. 11, 2011 and who will still hold powers that can potentially paralyze Morsi. The Brotherhood has reached accommodations with the generals at times over the past 16 months, as it struck deals with Mubarak's regime itself gaining it a reputation among critics as willing to sell out for a taste of authority.
But after a highly polarized presidential election and the miltary's arrogation of powers to itself, the Brotherhood presented itself as willing to get into a confrontation with the Supreme Council of the Armed Forces, the body of top generals headed by Field Marshall Hussein Tantawi, Mubarak's defense minister for 20 years.