Egypt's ex-president Hosni Mubarak is expected to leave jail, with a court ordering him freed pending trial.
However, he will immediately be placed under house arrest.
On Wednesday, a court said Mubarak could be granted conditional release pending trial in three cases against him.
But the government said it would place the 85-year-old under house arrest after his release, on the basis of Egypt's current state of emergency.
State news agency MENA, citing sources speaking on condition of anonymity, said the final paperwork processing the former president's release would be processed on Thursday morning.
Mustafa Baz, deputy interior minister for prison affairs, was expected to send Mubarak's file to the prosecutor's office for confirmation that there was no outstanding basis for pre-trial detention.
Mubarak was then expected to be taken from Cairo's Tora prison by helicopter to a new location where he would remain under house arrest.
It was not clear exactly when Mubarak, who was ousted in Egypt's 2011 uprising, might leave prison, or where he would be taken.
MENA said it would be for interim prime minister Hazem el-Beblawi to decide where he would be held.
Among the potential locations are his residence in Sharm al-Sheikh in Sinai, as well as two military hospitals where he has been treated in recent years - one in Cairo, the other north of the capital.
Mubarak still faces prosecution relating to two charges of corruption and one for complicity in the deaths of around 850 people killed during the 2011 uprising.
Last year, Mubarak was convicted on the complicity and corruption charges and sentenced to life in prison.
But a retrial was ordered on the basis of procedural errors. His next hearing is on Sunday.
Mubarak's release threatens to add a volatile new element to the political turmoil that has rocked Egypt in recent weeks.
Nearly 1000 people were killed in a single week between the August 14 dispersal of protests in support of ousted Islamist president Mohamed Morsi and Wednesday.
The ongoing political crisis meant it came as no surprise the army-installed government would seek to keep Mubarak under house arrest, in a bid to tamp down tensions.

