An Egyptian court has ordered the release on bail of former President Hosni Mubarak in a corruption case.
Reports suggest he may be freed from jail on Thursday – but officials say he will be put under house arrest.
The 85-year-old still faces charges of complicity in the killing of protesters during the uprising that forced him from power in 2011.
He was sentenced to life in jail last year, but a retrial was later ordered after his appeal was upheld.
That retrial opened in May but Mr Mubarak has now served the maximum amount of pre-trial detention permitted in the case.
State of emergency
On Wednesday, a court ordered Mr Mubarak’s release, said his lawyer and judicial sources.
Asked when Mr Mubarak could actually leave the prison, his defence lawyer Fareed El-Deeb told Reuters: “Maybe tomorrow.”
The ruling came during a hearing on charges that the former president had accepted gifts from state-run publisher al-Ahram.
State prosecutor Ahmed el-Bahrawi was quoted by Reuters as saying that the ruling “is final and the prosecution cannot appeal against it”.
Prosecutors have previously brought new charges when courts have ordered Mr Mubarak’s release – a move intended to keep the ailing ex-leader in detention.
Later on Wednesday, the office of Prime Minister Hazem el-Beblawi said that Mr Mubarak would be placed under house arrest after his release.
“In the context of the emergency law, the deputy military commander issued an order that Hosni Mubarak should be put under house arrest,” the office said in a statement.
Egypt is under a state of emergency amid the bloodshed which has accompanied the interim government’s crackdown on Islamists opposed to the army’s ousting of Islamist President Mohammed Morsi on 3 July.
Hundreds of members of the Muslim Brotherhood – the movement from which Mr Morsi comes – have been detained including its most senior leader Mohammed Badie, who was wanted over alleged incitement to violence and murder,
Analysts say Mr Mubarak’s release – if it happens – would be seen by many as a sign the military is rolling back the changes that flowed from the 2011 uprising.
European Union foreign ministers on Wednesday held urgent talks to determine a response to the clampdown.
At the meeting in Brussels, they agreed to stop export licences on military equipment to Egypt and to reassess security co-operation.
Arms are provided by individual countries rather than the EU as a whole, mostly by Germany, France and Spain. The UK has already suspended some of its military help.
But the 28-member block’s humanitarian aid to Egypt would remain unaffected, despite calls from some EU politicians to cut the assistance after more than 900 people were killed in clashes last week.
The violence erupted as security forces cleared two sit-ins in Cairo by people demanding the reinstatement of Mr Morsi.
The EU’s foreign policy chief, Baroness Catherine Ashton, said: “Assistance to the most needy will remain. All member states feel very strongly they want to continue to support the people of Egypt.”
She earlier offered to mediate a political solution to the crisis and is working on “confidence building measures” between the interim government and Brotherhood.
In Washington, senior officials discussed on Tuesday whether to reduce the $1.3bn (£830m) in military aid that the US gives Egypt every year. The meeting reportedly produced no imminent changes to US policy.