CAIRO - Egyptian leader Hosni Mubarak will leave jail as early as Thursday after a court ruling that jolted a divided nation already in turmoil seven weeks after the army toppled Islamist President Mohamed Morsi.
Mubarak will then be put under house, the prime minister's office said in a statement. The decision was authorized under Egypt's Emergency Law recently enacted under a security crackdown on Islamists, it added.
By keeping Mubarak under house arrest, Egyptian leaders may be trying to show they will not be too lenient with him to avoid angering the many Egyptians who held mass protests that led to the end of his iron rule in 2011.
Two groups of activists have already called for sit-ins in Cairo to protest against his expected release.
Convening on Wednesday at the Cairo jail where Mubarak is held, the court ordered the release of the military man who ruled Egypt for 30 years until he was overthrown during the uprisings that swept the Arab world in early 2011.
Asked when his client would go free, Mubarak's lawyer, Fareed al-Deeb, told Reuters: "Maybe tomorrow".
Mubarak, 85, was sentenced to life in prison last year for failing to prevent the killing of demonstrators. But a court accepted his appeal earlier this year and ordered a retrial.
The ailing ex-president probably has no political future, but some Egyptians were indignant at the court ruling, which state prosecutor Ahmed el-Bahrawi said cannot be appealed.
"The army has brought back Mubarak's regime, the same regime," said Guma Abdel Alim, outside a bicycle shop in central Cairo. "Those who were elected by the people are now in prison."
He was referring to a wide-scale security sweep on Morsi's Muslim Brotherhood that has netted many of its leaders.
Shopworker Rubi Abdel Azim said Mubarak had been the worst ruler in Egypt's history, but a passerby in a worn-out shirt disagreed. "He was the greatest president," said Nagi Hassan.
Political turbulence has kept Egypt on edge for months. At least 900 people, including 100 soldiers and police, have been killed in a crackdown on Morsi supporters in the past week, making it the country's bloodiest internal episode in decades.
Mubarak's release could add to tensions in a country where the Muslim Brotherhood has accused the army of trying to bring back the old regime.
"Today there was a decision to release him. Naturally that will cause a backlash in large segments in the Egyptian street," said analyst Adel Soliman.
The Brotherhood has said it would never abandon efforts to restore Morsi to power, although a fierce state security crackdown appears to have hurt the group. In the past week, it has struggled to get people on the streets to protest.
Morsi's supporters called on Egyptians to hold "Friday of Martyrs" protests against the military takeover that ousted him.
A grouping calling itself the National Coalition to Support Legitimacy, which has been demanding Morsi's reinstatement, said in a statement: "We will remain steadfast on the road to defeating the military coup."
The United States and the European Union are both reviewing aid to Cairo in light of the bloodshed, but Saudi Arabia, a foe of the Brotherhood, has promised to make up any shortfall.
The European Union stopped short of agreeing immediate cuts in financial or military assistance to Cairo, as the bloc's foreign ministers held emergency talks on Wednesday to find ways to help bring an end to violence in Egypt.
The decision acknowledges Europe's limited economic muscle in forcing Egypt's army-backed rulers and Morsi's supporters into a peaceful compromise.
It also reflects a concern that abruptly cutting aid could shut dialogue with Cairo's military rulers and damage Europe's ability to mediate in any future negotiations to end the strife.
Egypt has repeatedly said it does not want foreign powers to interfere in its standoff with the Brotherhood.
"Egypt can never accept an interference in its sovereignty or the independence of its decisions or an interference in its internal affairs," Foreign Minister Nabil Fahmy said in a statement issued after the EU talks.
"The only standard that rules Egypt's decisions is the supreme interest of the country and its national security."
There was no immediate reaction to the ruling on Mubarak from the Brotherhood, whose leaders are mostly behind bars.
Mubarak is still being retried on charges of complicity in the killing of protesters during the revolt against him, but he has already served the maximum pre-trial detention in that case.
The court ruling removed the last legal ground for his imprisonment in connection with a corruption case, following a similar decision in another corruption case on Monday. Mubarak will not be allowed to leave Egypt and his assets remain frozen.
Mubarak's two sons, Gamal and Alaa, along with former Interior Minister Habib el-Adly, are still in prison, and Adly's lawyer said the ruling on Mubarak had no bearing on their cases.
Some of the liberal and secular politicians who backed the army's ousting of Morsi, Egypt's first freely elected president, on July 3, said they regretted Mubarak's release but the judiciary's decision should be respected.
"His regime was lousy and he destroyed the country," said Mohamed Abolghar, head of the Egyptian Social Democratic Party, to which the army-appointed interim prime minister belongs.
Noting Mubarak's age and the jail time he has served, he said: "We should focus on building the country, establishing democracy and finishing the problem of the Muslim Brotherhood.
"The government knows that if Mubarak is freed there will be public outrage, but a court decision is a court decision."
Khaled Dawoud, spokesman of the liberal Dostour Party, said the trials of the ex-president and his associates had all been flawed because the judiciary was ill-equipped to deal with cases related to Mubarak's rule, resulting in a series of acquittals.
"It was a faulty process from the beginning," he said.
The relatively muted response from Mubarak's non-Islamist opponents may reflect a reluctance to rock the boat following the army's removal of Morsi, which they had endorsed.
The generals say they were responding to the will of the people after vast demonstrations organized by liberals and leftists demanding Morsi's ouster. They have installed an interim administration to oversee a road map back to democracy.