By Marwa Awad and Tom Pfeiffer
CAIRO (Reuters) - Sat between Egypt's two top generals, newly elected Islamist President Mohamed Mursi oversaw a passing-out ceremony of military recruits on Thursday in a rigidly choreographed scene that could almost have been taken from the era of Hosni Mubarak.
Yet beneath the formalities, a more subtle game is at play as two long-time adversaries size each other up for what is likely to be an Islamist war of attrition to scale back the influence of an army that has ruled the nation for 60 years.
Mursi, propelled into office on Saturday with the first real popular mandate in Egypt's history, saw his powers trimmed on the eve of victory by generals as wary of Islamists as their old commander-in-chief Mubarak, ousted last year in a street revolt.
The new president has quickly fallen in step with the displays of military pomp that are a fixture of Egyptian national life, even though the armed forces have given him no influence over their affairs.
The government he is trying to form could leave the most powerful ministries in the hands of the army, which also has the last word on new laws since it disbanded the lower house of a parliament dominated by Mursi's Muslim Brotherhood, following a court ruling that found fault in the voting process.
In the eight decades since it was formed, the Brotherhood has mostly avoided outright confrontation with those in power and Mursi looks likely to uphold the tradition - working below the radar to make gradual inroads into a monolithic state.
"It's a dance of the scorpions between the two of them," said a senior state official, commenting on the developing dynamic between Mursi's team and the military leadership.
Officially, the army has taken control of Mursi's future powers by handing itself veto power over a new constitution.
But the president's popular mandate gives him a strong hand to demand enough power to tackle corruption and poverty and restore stability, all demands of those who led the uprising that toppled former air force commander Mubarak.
One Western diplomat said Mursi was acknowledging the need for compromise by accepting what he called an "imperfect presidency" that was still better than none at all. It was, he said, "part of Egypt's new political cohabitation".
Whether that struggle for influence has succeeded may only emerge long after the constitution is approved and depends on whether Mursi can assert his authority over an inefficient bureaucracy marred by corruption.
Mursi has already changed some presidency staff and security officers. He has met the heads of the state finance and audit bodies to call for more transparency and better management, according to a senior aide to the president.
For now, he and the Brotherhood seem to be going along with the army's plans. One senior Brotherhood official suggested the military was expected to keep control of defense, interior and foreign affairs in a government to be formed in coming days.
"They will continue to be run as they have before," the official close to the movement's leadership, who asked not to be named, said of the ministries.
But he added that gradual reforms were expected at the Interior Ministry, which has been the target of widespread criticism because of tough police tactics in Mubarak's era.
However, the final shape of the cabinet has yet to appear and the Brotherhood has said it will work with Islamist allies, Christians, liberals and others to form a coalition government
Mursi, once held prisoner by Mubarak's state security, swept into a military base on the Mediterranean in Alexandria on Thursday in a large black motorcade to witness a spectacular display of rank-and-file discipline and military hardware, a portion of an arsenal partly paid for by the United States.
Helicopters swooped overhead, missiles were cranked skywards, flares burst and hundreds of marines showed off their close-combat martial art skills in time to a military band.
The bearded president, wearing a grey suit, was flanked by the head of the armed forces, Field Marshal Hussein Tantawi, and his chief of staff Sami Enan.
Mursi, his face betraying little emotion, exchanged a few words with 76-year-old Tantawi, who offered him tips on parade protocol and attaching medals to troop uniforms.
Explaining its reluctance to hand over full powers to Mursi, a member of the military council that ran Egypt since Mubarak's overthrow said the army had to "contain the revolution and make sure it does not bring down the state".
"We do not want to be like neighboring countries that have gone unstable after toppling their leader," he said.
The senior Brotherhood official suggested the new cabinet could contain some figures from the Mubarak era to ensure continuity and a transfer of governing know-how.
For now, he said, the Brotherhood was dropping its demand that the army reinstate the parliament that Islamists dominated before it was dissolved by the Supreme Court ruling. The generals will be able to veto any laws proposed by Mursi.
"There were talks to bring back parliament but at this juncture this will not be possible," the official said.
Other Islamists have suggested there could be efforts to ensure that only a portion of the seats in the assembly would have to go for re-election as the dissolution of the entire chamber has been challenged in another court.
Saad el-Husseiny, head of the planning and budget committee of the Brotherhood's Freedom and Justice Party, said there was a legal route for the president, who now has executive power, to overturn Field Marshal Tantawi's decision to dissolve the entire parliament.
The power play since Mubarak's overthrow suggests Egypt is moving steadily towards a Turkey-style accommodation between a powerful army and an Islamist movement that gradually shifts its people into the institutions of government.
Egyptian General Mamdouh Shahin said there was no question that the army would decide the future balance of power.
"The constitutional decree remains the exclusive authority of the military council. Nothing will change this," he told Reuters, adding that, for now, the army would act as a balance between the government and the president.
(Writing by Tom Pfeiffer and Marwa Awad; Editing by Alison Williams and Pravin Char)