Senior counsel Mark Dennis was intercepted by Australian Border Force on Tuesday when he arrived at Sydney Airport on a flight from Cambodia.
Border force and federal police officers searched his luggage and allegedly found an image of a boy, and explicit sexualised chats with and about minors on his phone.
The feted criminal barrister, held up by the state bar association in 2015 for excellence in his profession, had a blank expression and looked down as he beamed into the bail court in a grey jumper and handcuffs on Wednesday.
Commonwealth prosecutor John Kisch opposed his release, saying the 60-year-old was a party to conversations with at least two people that described sexual situations with minors.
"There's a description of potentially a desire to rape a 16-year-old," he saidÂ
"I appreciate that's as far as it goes, but certainly very disturbing chats."
The chats revealed Dennis had a sexual interest in children, the prosecutor said, and there was a risk he might remotely access and delete further evidence if freed on bail.
It appeared some evidence had already been deleted or removed from a Dropbox linked to at least 12 devices, Mr Kisch added.
"There's also an indication in the chats that further (child abuse) material has been sent other than the one image that is described, being the image of the boy (aged) six to 10 years," he said.
But Dennis, who wore a grey jumper and handcuffs, had not been accused of sending the low-resolution image of the boy to others or sending or receiving other child-abuse images, his lawyer said.
While he accepted there were "clearly unsavoury things" in the conversations, there was a real question as to whether that met the definition of the alleged crimes, barrister Michael Burke said.
He argued Dennis was not a flight risk and any concern about interfering with evidence could be counteracted by an order prohibiting him from using the internet.
He was not required to plead to the charges of possessing or controlling child abuse material obtained using a carriage service, transmitting such material and a related import offence.
A magistrate approved Dennis's release with onerous bail conditions, which bar him from being in the company of a minor without supervision or using the internet, except to talk to his lawyer or do banking.
He cannot contact people aged under 16 or enter any school or childcare facility.
A member of the prestigious Forbes Chambers, Dennis had ceased practice as a barrister for the foreseeable future, the court heard.
Dennis was admitted as a lawyer in 1991 and was principal solicitor of the Western NSW Aboriginal Legal Service.
He has authored numerous articles on criminal law, including a 2017 publication titled Defending Child Sexual Assault in the Local Court.
In 2015, he was awarded the Terry Keaney Memorial Award for excellence in his profession.
The 60-year-old is the co-founder and chair of charity Responsible People, which focuses on helping disadvantaged Cambodian youths advance their education.
His case will return to court in March.
1800 RESPECT (1800 737 732)
National Sexual Abuse and Redress Support Service 1800 211 028
Lifeline 13 11 14
Kids Helpline 1800 55 1800 (for people aged 5 to 25)