CAIRO — The Muslim Brotherhood claimed victory in Egypt’s landmark presidential runoff election early Monday, but its historic rise to power was blunted by a decree from the ruling military council to greatly limit the authority of the nation’s next leader.

The army’s action was the latest maneuver by deposed autocrat Hosni Mubarak’s old guard to hold sway over the country even as its longtime nemesis was promising a new era, marking a dramatic shift in fortunes in the Arab world’s most populous country. The military decree gives the generals control over passing laws and prevents the next president from overseeing the army’s budget and declaring war without the consent of the Supreme Council of the Armed Forces.

The move sours the victory the Muslim Brotherhood is projecting for its candidate, Mohamed Morsi, a religious conservative who is seen as heralding an untested political Islam in a country that since the 1950s has been governed as a secular police state. Official results have not been released, but the Brotherhood said Morsi had defeated Ahmed Shafik, the last prime minister to serve under Mubarak, in an election that polarized a nation left dispirited by months of unrest.

The struggle between the military and the Brotherhood, whose members were arrested and tortured throughout Mubarak’s rule, now moves to a more chilling battle for the country’s political future. Over the last week, the army has shown that it will not easily cede power: The nation’s constitutional court dissolved the Islamist-dominated parliament, and the Justice Ministry granted the generals wider authority to arrest civilians and political activists.

“Thanks be to God who has guided Egypt’s people to the path of freedom and democracy, uniting the Egyptians to a better future,” Morsi said early Monday. He added that he would not “seek revenge or settle scores.” Egyptian media reported that the Brotherhood projected that Morsi, a USC-educated engineer, had won 52.5% of the vote to Shafik’s 47.5%.

“Down, down with military rule,” a crowd chanted outside the headquarters of the Brotherhood’s Freedom and Justice Party. The Brotherhood also announced it would challenge the court decision to disband parliament. The army’s power grab opened a “new episode of a complete military coup against the revolution and the popular will,” said Mohamed Beltagy, a Brotherhood lawmaker.

Shafik’s campaign disputed Brotherhood claims that Morsi won Egypt’s first freely contested presidential election: “Our counting of the votes has so far showed that we are ahead with 52% of the vote, but we refuse to break the law and issue any numbers now,” spokesman Mahmoud Baraka told Reuters.

A retired air force general, Shafik had run a law-and-order campaign promising to stem Egypt’s rising crime, political dissent and economic turmoil. That message was overshadowed by suspicions stemming from his ties to the old government and comments that suggested he was still loyal to the 84-year-old Mubarak, who has been sentenced to life in prison for complicity in the killing of more than 800 protesters during the rebellion that toppled him in February 2011.

The apparent victory by the Brotherhood capped more than 80 years of struggle by the world’s most prominent Islamic movement to parlay its grass-roots religious and social programs into political clout. But Morsi did not win a mandate. Voting lines in cities and villages were thin, indicating that many of the country’s 50 million eligible voters were demoralized by two candidates whose backgrounds and ideologies are polar opposites and did not resonate beyond their constituencies.

What Egyptians may end up with is a shadow democracy that fails to fulfill the ideals for change that spurred the popular revolt and helped inspire uprisings across the Middle East and North Africa. The Brotherhood, which can easily mobilize tens of thousands of followers and was the muscle in the revolt against Mubarak, had threatened protests and a “second revolution” if Shafik won. But it is now unclear how it will counter the military’s hold on the government. Army and Brotherhood officials have been meeting in recent weeks, and since early this year, when Islamists took control of the now-disbanded parliament, the Brotherhood has at times cooperated with military desires.

That may change if Morsi is officially named president and the Brotherhood moves to capitalize on its new political legitimacy. But that is limited by the lower than anticipated turnout for the election. A judge on the nation’s constitutional court said only 40% of eligible voters cast ballots. Each side accused the other of voter fraud and the rhetoric sharpened as the race tightened and the polls closed Sunday evening. Egyptian media reported that military police raided at least two Morsi campaign offices.

Egypt’s predicament suggests that its revolution, which captured imaginations around the world, may have been largely cosmetic, changing the face of power but not its heart. That was evident when the military council announced that it would issue its decree snipping presidential powers. Many activists and revolutionaries chose to boycott the election; others invalidated their ballots by defacing them or checking boxes for both candidates.

“Both candidates are wrong. I will not vote for someone I am not convinced of,” said Abeya Elbanhawy, a co-founder of We Are Watching You, an election monitoring organization. “We don’t have a constitution. We don’t know the powers of the next president and we don’t have parliament, so how can we even vote under these circumstances?”

She added, “We aren’t apathetic by voiding [ballots] because we are going to the polls to send a message and also make sure our ballots aren’t forged.”

Other Egyptians believed the election was a historic event that could set the nation on a path of stability.

“There needs to be hope,” said Shadia Fayez, who cast her ballot in a poor Cairo neighborhood. “I voted for Shafik because he can bring back stability and a better economy. I have no fears of Shafik bringing back the old regime.... Who had ever heard of Morsi before these elections?”

The day was punctuated by fears of unrest and colorful accusations of vote buying and bribery. Egyptian media reported that “several knife-wielding” Shafik supporters attacked Morsi backers in the town of Fayoum. The Ahram Online news website said that a wife of a leading figure in the Brotherhood’s Freedom and Justice Party “went to the polling station to cast her ballot and found that someone had already voted for her.”

Many Egyptians worried that even as the country was choosing a president, the military, which is controlled by Mubarak-appointed generals, was intensifying its hold. Shortly after the polls closed Sunday, the army moved quickly to cement its grasp, locking parliament’s door as its soldiers patrolled voting stations and bolstered barricades in an expanded martial law.

“This law that allows the military to make random arrests will give Shafik and the military the complete powers,” said Ahmed Alish, a 25-year-old activist. “I can oppose a party or movement like the Brotherhood, but we will not be able to stand up to the system and institution that Shafik and the army would strengthen.”

jeffrey.fleishman@latimes.com

Abdellatif is a special correspondent.