UPDATE 4-Egypt army plan would sideline Mursi if no deal in 24 hours
* Islamist president rejects army deadline, says will go own way
* Newspapers say Mursi finished, Muslim Brotherhood rule ending
* Protesters encamped in Tahrir Square, more demonstrations planned
(Releads with army plan, adds clashes)
CAIRO, July 2 (Reuters) - Egypt's army has plans to push President Mohamed Mursi aside and suspend the constitution if he fails to strike a power-sharing deal with his opponents within 24 hours, military sources told Reuters on Tuesday.
Egypt's first freely elected leader was still clinging to power with tens of thousands of people on the streets from rival factions. There were some clashes between Mursi's Islamist supporters and those who want him forced out after only a year in office.
Military sources told Reuters that once a two-day deadline set by the head of the armed forces expires at 5 p.m. (1500 GMT) on Wednesday, the military intended to install an interim council, composed mainly of civilians from different political groups and experienced technocrats, to run the country until an amended constitution was drafted within months.
That would be followed by a new presidential election, but parliamentary polls would be delayed until strict conditions for selecting candidates were in force, they said.
They would not say how the military intended to deal with Mursi if he refused to go quietly. He rebuffed the ultimatum on Tuesday and said he would go on working. But he was looking increasingly isolated as ministers and officials who are not members of his Muslim Brotherhood resigned.
The confrontation has pushed the most populous Arab nation closer to the brink of chaos amid a deepening economic crisis two years after the overthrow of Hosni Mubarak, raising concern in Washington, Europe and neighbouring Israel.
The liberal opposition coalition has ruled out even starting negotiations with Mursi, saying they are simply waiting for the expiry of the deadline, which was set on Monday in dramatic fashion by General Abdel Fattah al-Sisi, the military chief-of-staff.
After that, their negotiator, former U.N. nuclear agency chief Mohamed ElBaradei, would deal directly with the military.
The military sources said the armed forces planned to open talks with the opposition National Salvation Front and other political, religious and youth organisations after the deadline.
The emerging military roadmap could be amended as a result of those consultations, they said. Among figures being considered as an interim head of state was the new president of the constitutional court, Adli Mansour.
The army blueprint closely resembles proposals for a democratic transition put forward by the NSF. The military sources said the new transition arrangements would be entirely different from the military rule that followed Mubarak's fall.
Then, the armed forces' council held effective power but was widely criticised by liberal and left-wing politicians for failing to enact vital economic and political reforms, and siding with the Muslim Brotherhood.
In a defiant 2 a.m. statement, Mursi's office said the president had not been consulted before the armed forces chief-of-staff set a 48-hour deadline for a power-sharing deal and would pursue his own plan for national reconciliation.
Newspapers across the political spectrum saw the military ultimatum as a turning point.
"Last 48 hours of Muslim Brotherhood rule," the opposition daily El Watan declared. "Egypt awaits the army," said the state-owned El Akhbar.
The president's office said Mursi was meeting Sisi and Prime Minister Hisham Kandil for the second straight day.
Military sources said troops were preparing to deploy on the streets of Cairo and other cities to prevent clashes.
Fighting between Mursi supporters and opponents broke out on Tuesday afternoon in the Cairo suburb of Giza, in Alexandria and in the town of Qalyubia, north of Cairo, security sources said. In Alexandria, soldiers intervened to separate rival factions.
Protesters remained encamped overnight in Cairo's central Tahrir Square and protest leaders called for another mass rally later in the day, dubbed a "Tuesday of persistence", to try to force the president out.
Senior Muslim Brotherhood leaders branded the military ultimatum a "coup", backed by a threat that the generals will otherwise impose their own road map for the nation.
The Brotherhood's political wing called on supporters to stage mass counter-demonstrations to "defend constitutional legitimacy and express their refusal of any coup", raising fears of violence. One of its leaders urged "free revolutionaries" who supported Mursi to prepare for martyrdom.
After millions protested on Sunday, Sisi delighted Mursi's opponents by effectively ordering the president to heed the demands of the street. It took the president's office nine hours to respond with a statement indicating he would go his own way.
"The president of the republic was not consulted about the statement issued by the armed forces," it said. "The presidency confirms that it is going forward on its previously plotted path to promote comprehensive national reconciliation ... regardless of any statements that deepen divisions between citizens."
Describing civilian rule as a great gain from the revolution of 2011, Mursi said he would not let the clock be turned back.
He spoke to U.S. President Barack Obama by phone on Monday, stressing that Egypt was moving forward with a democratic transition. The White House said Obama encouraged him to respond to the protests and "underscored that the current crisis can only be resolved through a political process".
At least six ministers who are not Brotherhood members have tendered their resignations since Sunday's huge demonstrations, including the foreign minister, Mohamed Kamel Amr. The cabinet spokesman also resigned, the state news agency MENA said.
Kandil chaired a session of the rump cabinet without the key ministers of defence and the interior. Justice Minister Ahmed Suleiman denied reports that the government had resigned.
In another blow to the president, Egypt's top appeals court upheld the dismissal of the prosecutor general appointed by Mursi last year - a major bugbear to the liberal opposition - and replaced him with his Mubarak-era predecessor.
Senior Brotherhood politician Mohamed El-Beltagy said that move was part of a creeping coup. He said he expected the High Committee for Elections to meet within hours to consider annulling the 2012 presidential election.
Compounding a sense of an administration disintegrating even as the president hangs on, Mursi's military adviser, U.S.-trained former chief-of-staff General Sami Enan, also resigned.
World powers are looking on anxiously, including the United States, which has long funded the Egyptian army as a key component in the security of Washington's ally Israel.
General Martin Dempsey, chairman of the U.S. Joint Chiefs of Staff, spoke to his Egyptian counterpart on Monday. It is unclear how far the military has informed, or coordinated with, its U.S. sponsors but an Egyptian official said a coup could not succeed without U.S. approval.
The United Nations Human Rights office called on Mursi to listen to the demands of the people and engage in a "serious national dialogue" but also said: "Nothing should be done that would undermine democratic processes."
A senior European diplomat said that if the army were to go further and remove the elected president, the international community would have no alternative but to condemn it.
Yasser El-Shimy, Egypt analyst at the International Crisis Group, said the army ultimatum had hardened positions on either side, making it very difficult to find a constitutional way out of the crisis: "Things could deteriorate very rapidly from there, either through confrontations on the street, or international sanctions," he said.
"Mursi is calling their bluff, saying to them, 'if you are going to do this, you will have to do it over my dead body'."
Among Mursi's allies are groups with militant pasts, including al-Gamaa al-Islamiya, a sometime associate of al Qaeda, whose men fought Mubarak's security forces for years and who have warned they would not tolerate renewed military rule.
For many Egyptians, fixing the economy is key. Unrest since Mubarak fell has decimated tourism and investment and state finances are in poor shape, drained by extensive subsidies for food and fuel and struggling to provide regular supplies.
The Cairo bourse, reopening after a holiday, shot up nearly 5 percent after the army's move.
(Reporting by Asma Alsharif, Alexander Dziadosz, Shaimaa Fayed, Maggie Fick, Alastair Macdonald, Shadia Nasralla, Tom Perry, Yasmine Saleh, Paul Taylor and Patrick Werr in Cairo and Yursi; Mohamed in Ismailia; Writing by Alastair Macdonald and Paul Taylor; Editing by Alastair Macdonald and Peter Graff)