Details have been revealed about the extraordinary negotiations that led an electrician, acquitted of murdering his partner, Matthew Leveson, to confess later to dumping his body.
Michael Atkins, 44, underwent hypnosis, drew a diagram of Mr Leveson's grave site and walked through dense bushland with homicide detectives in an attempt to uncover where he buried the body years earlier.
Mr Atkins' actions were a sensational turnaround from his long-standing denials of knowing what happened to Mr Leveson, 20, who was last seen leaving a Sydney nightclub in 2007.
It was only after Mr Atkins was granted immunity from prosecution that he agreed to tell police where Mr Leveson's body was buried.
The complex legal deals that led to that point late last year were detailed in the NSW Coroner's Court on Wednesday.
The inquest into the disappearance of Mr Leveson has resumed after police in May discovered his skeleton in bushland south of Sydney.
The court heard how Mr Atkins drew the diagram for police of where his former partner's grave was and described the two- by one-metre hole he dug.
In November last year, he travelled with detectives to the Royal National Park and walked through the bush, trying to remember where, nine years before, he buried the body.
It wasn't until six months later that Mr Leveson's skeleton was found, buried 60 centimetres deep, after a backhoe pulled a large plant from the ground.
As long-awaited details of Mr Atkins' actions were revealed in court, Mr Leveson's mother, Faye, wiped away tears and was comforted by friends.
Mr Atkins was compelled to give evidence at the inquest last year after being granted a section 61 certificate under the NSW Coroner's Act.
However, he was not protected from perjury charges if he lied in the witness box.
"My thinking was that the investigation was taken as far as it could be taken," Homicide Squad Detective Chief Inspector Gary Jubelin told the inquest.
After forming the view that Mr Atkins had potentially lied in his evidence, and in turn committed perjury, police saw this as an opportunity to get further information from him.
The NSW Attorney-General agreed to a separate immunity deal. That agreement protected Atkins from being charged with perjury if he showed police where the body was.
Mr Leveson's family supported the move, in the hope of finally getting their son's body back.
"When all the circumstances were explained to them, they had an appreciation of what we were trying to achieve here and they supported it," Inspector Jubelin, who took over the case in 2014, said.
Over six months, police carried out separate searches in the bushland, focused mainly on an area just off McKell Road, four kilometres from Waterfall train station.
Finally, Mr Leveson's skeleton was found.
The backhoe pulled a cabbage-tree palm from the ground on May 31 and, after two or three scrapes of the earth, Detective Senior Constable Scott Craddock saw the remains.
Mr Atkins was acquitted of Mr Leveson's murder and manslaughter following a trial in the NSW Supreme Court in 2009.