A Zimbabwean High Court judge has ruled that the military action leading to Robert Mugabe's resignation was legal.
High Court Judge George Chiweshe ruled that the military's actions "in intervening to stop the takeover" of Mugabe's constitutional functions "by those around him are constitutional and lawful".
The military stepped in almost two weeks ago after Mugabe's firing of deputy Emmerson Mnangagwa amid fears that Mugabe's wife Grace was positioning herself to take power.
Zimbabwe's military has sought to show its actions were not a coup.
The judge said the military had ensured that non-elected individuals do not exercise executive functions.
The judge also said Mugabe's firing of Mr Mnangagwa as vice president was illegal. He was sworn in as president on Friday in a whirlwind reversal of fortunes.
The judge's decisions were criticised by legal and rights experts and by close allies of Mugabe and his wife.
"If these breathtaking High Court Orders granted in Harare yesterday represent what is being peddled as a 'new path,' then please pray for Zimbabwe," tweeted minister of higher education Jonathan Moyo, the most vocal of the Mugabes' allies.
The southern Africa director for Human Rights Watch, Dewa Mavhinga,called the rulings "incredible" and said on Twitter: "Strange, captured judiciary?"
Zimbabwe's military sent tanks into the streets overnight on November 14, taking control of the state broadcaster and announcing that Mugabe had been put under house arrest.
It also said it was pursuing "criminals" close to Mugabe who were accused of harming the country's economy.
The military's move led the ruling party to turn against Mugabe, launching impeachment proceedings before Mugabe on Tuesday announced his resignation, while tens of thousands of Zimbabweans took to the streets in a military-backed demonstration urging him to step aside.
A number of cabinet ministers have not been seen publicly since the military swept in, while rights activists have begun sharing worrying details of assaults and raids on their homes amid concerns about possible retaliation.