EGYPT. Egyptians packed Tahrir Square in Cairo through the night on Saturday, waving flags and chanting for the end of military rule as they waited to know the name of the first president they have been free to choose.

After a week of drama, in which the Muslim Brotherhood's hopes of victory in the presidential election were soured by the army dissolving the Islamist-led parliament and decreeing tight limits on the new head of state's powers, there was anxiety on the streets, but also some hope a compromise could be found.

With the electoral commission still not promising to give a result of last weekend's presidential run-off before Sunday, senior figures on the ruling military council and among their old enemies in the Brotherhood told Reuters they had already held talks about future constitutional arrangements this week.

In Tahrir Square, where demonstrators faced down Hosni Mubarak's police state during last year's Arab Spring and forced him from power, thousands of mainly Islamist protesters have gathered in growing numbers for several days. They were determined to see the army that pushed Mubarak aside make good on its promise to hand over to civilian government by July.

"Say it without fear, the army must leave," they chanted among hundreds of fluttering flags carrying Egypt's red, white and black colors. "Down, down with military rule!"

The ruling military body, the Supreme Council of the Armed Forces (SCAF), made clear, however, it was not about to accede to their demands, which include reversing the dissolution of parliament and cancelling a decree by which it took legislative power for itself until a new constitution is in place.

But both sides recall the bloodshed that ravaged another North African state, Algeria, when military rulers thwarted an Islamist movement's triumph at the ballot box in the 1990s, and appear willing to renew the tentative cooperation they built up after Mubarak's overthrow and step back from an outright clash.

An Islamist insurrection in Egypt in the 1990s also cost hundreds of lives, making the Brotherhood wary of violence.

Delay in the final tally of votes between Islamist Mohamed Morsy and former General Ahmed Shafik was due to many appeals being heard by the electoral commission, officials said. But it also gave more time for talks to defuse tensions.

"There has definitely been the process involved in tallying the official vote before announcing results," a senior state official familiar with the counting process told Reuters on Friday. "But there is also the politicking behind the scenes, with each side weighing up the strength of the other.

"The Brotherhood can draw millions of disciplined supporters onto the streets and the army has a mandate to ensure order."

Discussions between generals and Islamists, whose violent confrontation has marked Egypt for decades, were assuming a likelihood that Morsy will win narrowly, something electoral and army officials told Reuters seemed probable, but not certain.

"We have met with them to discuss how to get out of this crisis after parliament was dissolved and the new president's powers curbed," Khairat al-Shater, who runs the Brotherhood's finances and strategic planning, told Reuters - although he added they were some way from reaching any kind of agreement.

"The generals feel they are the proprietors of power and have not yet reached a level of real compromise," he said.

Major General Mamdouh Shaheen, a member of SCAF, confirmed the recent meetings and repeated the army's commitment to a democratic transition. But he echoed a strong statement issued by SCAF on Friday that rejected the Brotherhood's demands.

"The constitutional decree is the exclusive authority of the military council," Shaheen told Reuters.

In a brusque, four-minute statement read on state television as Egyptians were completing their Friday prayers, the generals stood by what critics at home and in the West have called a "soft coup" intended to prolong six decades of military rule.

"The issuance of the supplementary constitutional decree was necessitated by the needs of administering the affairs of the state during this critical period in the history of our nation," the off-screen announcer said in stiff, bureaucratic language.

The Brotherhood's candidate, Morsy, shot back that the generals were defying the will of the people and said protests would go on. But he stopped short of repeating his public claim to have already won the election, urging simply a rapid announcement of the result, and praised the army as "patriotic".

In what were menacing tones for the army's old adversary the Muslim Brotherhood, SCAF criticized its premature announcement of the election result as sowing division and said people were free to protest - but only if they did not disrupt daily life.

"This is a classic counter-revolution that will only be countered by the might of protesters," said Safwat Ismail, 43, a member of the Muslim Brotherhood on Tahrir Square.

"I am staying in the square until the military steps down."

The broad traffic intersection by the Nile in central Cairo was filled with makeshift tents offering shade by day from the scorching sun and hawkers offering an array of goods from tea to "I Love Tahrir Square" T-shirts. The crowd swelled when the heat faded, and many remained overnight, the square turning into a makeshift campground for thousands bused in from the provinces.

Mahmoud Mohammed, a bearded, 31-year-old marine engineer from Alexandria among a group from the fundamentalist Salafist movement camping on the square, insisted they were not looking for a battle, but wanted to see democracy installed.

"The people elected a parliament and they put it in the rubbish bin. We need the army to hand over," he said. "No one came here for a fight. We need democracy."

Smaller groups of secular activists joined the mainly Islamist throng. But the absence of many of the liberal urban youth who drove the early days of the revolt against Mubarak has highlighted a weariness with turmoil and a dismay at politics that have boiled down to Egypt's familiar choice between army and religion, the two best organized institutions, at the expense of candidates from the fragmented centre ground.

The decree has also given the military power to step in and force the pace of drafting a constitution, a process slowed in parliament by a lack of consensus between Islamists and other, secular parties. Some lawmakers involved were due to meet again on Saturday to try to make progress and keep control.

In a country where virtually no one can remember an election before last year that was not rigged, trust is low, not least among Brotherhood officials, many of whom, like Morsy, were jailed under Mubarak for their political activities.

The same electoral commission that handed 90 percent of a November 2010 parliamentary vote to Mubarak's supporters - a result that fuelled the protests that brought him down a few weeks later - sits in judgment on the new presidency.

MIDDLE EAST BUSINESS COMMENT & ANALYSIS

INTERNATIONAL. Washington is moving away from the strategy it has followed since the early 2000s - of being the prime military force in regional conflicts - and is shifting the primary burden of fighting to regional powers while playing a secondary role.

INTERNATIONAL. Washington is moving away from the strategy it has followed since the early 2000s - of being the prime military force in regional conflicts - and is shifting the primary burden of fighting to regional powers while playing a secondary role.