The man accused of killing Bundaberg schoolgirl Trinity Bates has faced court in prison clothes and handcuffs.
Allyn John Slater, 19, of Bundaberg, sat with his head bowed after police escorted him into the Bundaberg Magistrates Court on Wednesday morning.
His legal aid lawyer, Thomas Bray, immediately asked magistrate Jennifer Batts to hear an application for Slater's case to be heard in a closed court.
The magistrate agreed, and cleared the room while the matter was being considered.
Police prosecutor Sergeant Barry Stevens said he had no objection to the court being closed.
Earlier, police had warned Bundaberg residents to show restraint and security was tight outside the court when Slater arrived.
Detective Superintendent Maurice Carless said he understood there was widespread community anger, but people must show restraint.
Police had been taken steps to ensure the safety of the accused, he said.
"Steps are being taken to ensure all persons involved in this matter have their security (ensured)," he said.
"Certainly, I can understand people's feelings but in terms of taking action on that, I think it's prudent to let the course of justice take its course.
"We'll be urging people to show restraint."
He said police would oppose bail, adding further charges could be laid against the man after a post-mortem examination was completed later in the day.
Superintendent Carless said the family had expressed relief after hearing an arrest had been made.
"I understand the family has been relieved but, of course, this is a time for them for grieving," he said.
"It's a very difficult time so you can imagine there's a range of feelings they are going through."
Preparations are underway for a prayer vigil for Trinity at the Bundaberg Central Pavilion from 7pm (AEST) on Wednesday.
Meanwhile, students at the tiny school she attended on the outskirts of Bundaberg have been grieving in their own way, posting cards and other tributes on the wall of a new building that has become a makeshift shrine.
Trinity was in year four at the Gooburrum State School and principal Halli Cantrell said her fellow students were sad and fearful.
"Little children should not have to hear this information, but we've done it as delicately as possible," she told the Bundaberg News Mail.
"We obviously feel deeply for the parents and family."
She said relief teachers and guidance officer were at the school from Tuesday to help students deal with the tragedy.
"It's almost like what has happened is a nightmare situation for the children," Ms Cantrell said.
"They are asking things like: 'Is our house safe'."
Trinity allegedly was taken from her Walker Street home. Her parents called police when they realised she was missing on Monday morning. Her body was found in a nearby drain soon afterwards.
Share

