Former Philippines President Joseph Estrada has won a legal battle to be placed under house arrest rather than remain in military detention.
Mr Estrada was forced from office in a military-backed coup
Mr Estrada is currently being held in a military camp outside Manila, while his trial for corruption continues.
The former leader has been in detention since April 2001, after being forced from office in a military-backed coup.
He denies the accusations against him, but if found guilty he faces a long jail term or even the death penalty.
In approving the transfer, the court acknowledged Mr Estrada's status as a former head of state, saying "The case is unique. He is a former president whose continuing political clout this court takes judicial notice of."
"There is no hard and fast rule when it comes to custodial arrangement of detention prisoners as opposed to convicted prisoners," it said.
Mr Estrada is on trial for economic plunder and bribery. Prosecutors allege that he looted $80m from state funds.
The court said it approved a "custodial arrangement" whereby Mr Estrada would be moved out of an army base east of Manila and into his holiday home nearby, which is said to boast its own chapel and swimming pool.
As part of the conditions for his house arrest, Mr Estrada will still be under the supervision of national police.
He will not be allowed to give interviews to the media unless the court allows it, and visiting rights will be at the discretion of police and the courts.
This is the second favourable legal ruling handed down to Mr Estrada in as many days.
On Monday, the court ruled he did not break money laundering laws when he opened a bank account in a different name in 2000.