The Muslim Brotherhood has reached some agreements with the army on the powers of Egypt's first Islamist president and the fate of a now-dissolved Islamist-led parliament, Brotherhood officials said on Tuesday.
The newly elected president, Mohammed Morsi, toured his palace on Monday. But after savouring the outcome of a vote that installed him in place of the Brotherhood's enemy Hosni Mubarak, he immediately went to see the generals in the Defence Ministry in a scene that seemed to underline who really calls the shots.
The Brotherhood, banned under Mr. Mubarak, sent its supporters onto the streets last week, promising open-ended protests after the Supreme Constitutional Court ordered the lower house dissolved, saying rules had been broken during its election six months ago.
That decision, backed by the army, threatened to force a new parliamentary election, which erode the bloc won by the Brotherhood and its allies, and undermine one of the biggest gains of the revolt that toppled Mr. Mubarak last year.
Islamists and others said this amounted to a military coup. The army compounded these fears by issuing a decree curbing the president's powers just as the presidential election closed.
Mr. Morsi was declared the winner on Sunday, a nail-biting week after voting ended. During the wait, the Brotherhood and the army held discreet talks, officials on both sides said.
The new president will be sworn in on Saturday, probably before the Constitutional Court, and the Brotherhood will also stage a symbolic swearing-in ceremony in Tahrir Square, according to Yasser Ali, an aide to Mr. Morsi.
Presidents were previously sworn in by parliament, which is now shuttered and under military guard.
The presidential election has set the stage for a tussle between the military, which has provided Egypt's rulers for six decades, and the Brotherhood, the traditional opposition - sidelining secular liberals who drove the anti-Mubarak uprising.
"We are working on reaching a compromise on various items so all parties are able to work together in the future," said Essam Haddad, a senior member of the Brotherhood and also an aide to Mr. Morsi.
Mr. Haddad, who accompanied Mr. Morsi on his tour of the presidential palace, said the negotiations had covered possible amendments to the army's constitutional decree limiting the president's powers.
"We do not accept having a president without powers. The solution being worked out now is scaling back those restrictions so that President Morsi can deliver to the people what he promised," Mr. Haddad said.
Military officials were not immediately available to comment.
Mr. Haddad said the military would keep control of its budget and internal affairs, but the generals would have to keep their hands off an assembly charged with writing a new constitution.
In its latest power grab, the army gave itself the right to veto articles of the constitution that the assembly will draft, angering the Brotherhood, which itself wants a big say.
"The negotiations involve loosening the grip of the generals on the constitutional assembly so that it can draft the new constitution without interference," Mr. Haddad said.
A senior Brotherhood aide, who asked not to be named, said the generals had agreed to lift their veto power over the composition of the 100-member assembly, provided that about 10 of its Islamist members were replaced with technocrats favoured by the military.
The aide said Mr. Morsi's team and the military council, which has ruled Egypt since Mr. Mubarak's removal, had also agreed on how ministries should be divided in the next cabinet.
"The ministries of finance and foreign affairs would go to the Brotherhood provided they steer clear of the defence, interior and justice ministries," the aide said.
Mr. Morsi met police commanders on Tuesday at the police academy where mr. Mubarak's trial was held. The police come under the Interior Ministry, run by ex-police chiefs in Mr. Mubarak's day.
The Brotherhood has pledged to reform a ministry seen as a tool of political coercion and responsible for many past abuses.
But the military has striven to clip the wings of an Islamist movement seen for decades as a danger to the state.
While it finally accepted that Mr. Morsi had defeated a former general in the presidential race, it has also appointed a general to run the presidency's financial affairs.
The army moved swiftly to close down parliament after the Supreme Constitutional Court ruled that the assembly had been elected in an unconstitutional manner, even though the vote had been viewed at the time as broadly free and fair.
The court ruled that the Brotherhood's Freedom and Justice Party and others should not have fielded candidates for both the two-thirds of seats contested by party lists and the one-third reserved for individuals.
Brotherhood officials said the army had agreed in talks that the election would be re-run only for the individual seats, and that a legal route would be found to get around the court's ruling that the whole house must be dissolved.
A lower court convened on Tuesday to hear the Brotherhood's argument that this should happen.
The Brotherhood, Egypt's oldest and most organized Islamist group, often met army generals after Mr. Mubarak's fall on Feb. 11, 2011, in an apparent effort to manage the transition equably.
But ties between the two hierarchical, disciplined entities became strained. The Islamists were frustrated at parliament's lack of sway over government policy, while the army became increasingly uneasy about the Brotherhood's drive for power, especially after it broke a pledge not to seek the presidency.
The Brotherhood and other opponents of military rule were also angered by a Justice Ministry order this month giving the army powers to arrest civilians. That effectively reinstated a much-hated state of emergency that had lapsed on May 31.
Mr. Mubarak had used emergency law throughout his 30 years in power to repress Islamists and other dissenters.
One Brotherhood official said the army had agreed to lift the new measure once the police force, which collapsed during last year's uprising, returned to the streets.
But a judicial source at the administrative court in Cairo said the court would anyway declare the measure invalid when it made a ruling later on Tuesday.