A Sydney man charged with murdering a nine-year-old girl whose body was found in a barrel has been under long-term care for mental health problems, a court has been told.
Justin Laurens Stein, 31, appeared via video link in Sydney's Central Local Court on Wednesday where his lawyer asked magistrate Robert Williams for an order to "protect his personal safety".
Stein is accused of murdering the schoolgirl who was reported missing last week while holidaying with family at Wildenstein Private Gardens in Mount Wilson, a village in the Blue Mountains northwest of Sydney.
According to court documents the girl - who can no longer be named for legal reasons - was murdered between 7pm on January 11, and 10am on January 12 at Mount Wilson.
She was reported missing on Friday morning, January 14.
Stein's lawyer said his client had been under long-term care for "mental health problems" and had been prescribed a fairly high dose of antipsychotic drugs quetiapine and risperidone for many years.
The magistrate said he would order Justice Health to assess Stein's mental health needs but that his prison status was up to Corrective Service NSW.
The court was told the case, due back in court on March 18 in Penrith, involved some "complexities".
Stein was arrested at his Surry Hills unit on Tuesday night after police found the body of the child in a barrel while searching bushland near a stretch of the Colo River.
More than 100 police and emergency personnel - including dog units, homicide detectives, rescue choppers and volunteers from the SES and Rural Fire Service - scoured the area around Mount Wilson and bush near the Hawkesbury River for five days.