A pedophile ex-magistrate will be released from prison when his sentence expires but he will immediately be placed on home detention while awaiting a court's decision on his future.
Peter Liddy, 83, is due for release on June 4 after serving his 25-year sentence for child sexual offences in South Australia between 1982 and 1986.
SA Attorney-General Kyam Maher has applied to the Supreme Court for Liddy to either be indefinitely detained, or the subject of an extended supervision order.