Hosni Mubarak, who was overthrown as president of Egypt in an uprising in 2011, will be released from detention in a military hospital after a six-year legal battle over accusations of involvement in the killing of protesters.
"He will go to his home in Heliopolis," Mubarak's lawyer Farid el-Deeb said, adding the ageing former president would likely be released on Tuesday or soon after, but would be barred from leaving the country pending an ongoing corruption investigation.
The prosecutor's decision came on Monday, days after an appeals court acquitted Mubarak on March 2 of involvement in the killing of protesters during the 2011 uprising that ousted him.
"Our son's blood was spilled for nothing," said Mostafa Morsi, whose son was shot dead aged 22 on January 28, 2011.
The president who ruled for 30 years was accused of inciting the deaths of protesters during the 18-day revolt, in which about 850 people were killed as police clashed with demonstrators.
Mubarak, 88, was sentenced to life in 2012, but an appeals court ordered a retrial, which dismissed the charges two years later.
Amid public anger, prosecutors had levelled various charges against Mubarak following his February 2011 resignation.
In January 2016, the appeals court upheld a three-year prison sentence for Mubarak and his two sons on corruption charges.
But the sentence took into account time served. Both of his sons, Alaa and Gamal, were freed.
Six years after his overthrow, most of the charges brought against his regime members have been dismissed while the country struggles to recover from the aftermath of the uprising.
The revolt ushered in instability that drove away tourists and investors, taking a heavy toll on the economy.
Mubarak's elected Muslim Brotherhood successor, Mohamed Morsi, served for only a year before the military toppled and detained him in 2013, before launching a deadly crackdown on those who backed him.
Hundreds of Morsi's supporters were sentenced to death after speedy trials. Morsi himself has also stood trial in several cases.
Critics say that the abuses they fought under Mubarak have returned with President Abdel Fattah el-Sisi, the former army chief who toppled Morsi.
Mai Mogib, a politics professor at Cairo University, said times have changed since the Middle East uprisings six years ago.
"Talk of the Arab Spring has completely stopped," she said. But "discussing Mubarak and symbols of his era has become acceptable in the media and in the street.
"He's in a better position than all other presidents who faced the Arab Spring," Mogib said.
Also on Monday, Sisi issued a pardon for 203 youths jailed for taking part in demonstrations against his rule, according to state news agency MENA. No official list of names was immediately available.
Since seizing power, Sisi has presided over a crackdown on his opponents that has seen hundreds killed and many thousands jailed.
Al Jazeera journalist Mahmoud Hussein has been detained in Egypt without charge for more than 80 days.
Hussein, an Egyptian based in Qatar, was stopped, questioned, and detained by the Egyptian authorities on December 20 after travelling to Cairo for a holiday.