A 14-year-old boy has been charged as a juvenile with murder and three counts of attempted murder after US authorities said he killed his father and opened fire on students at a school playground.
The boy did not show any emotion as he walked into the courtroom in Anderson, South Carolina, wearing a yellow jumpsuit. He was unrestrained, not wearing handcuffs or leg shackles.
His lawyer, Frank Epps, noted that the teenager has given a statement to law enforcement and asked that investigators not question him again without his lawyer present.
The judge agreed to that and ordered the teenager to be held in jail.
The boy's mother sat on the front row during the brief hearing and left the courtroom sobbing and leaning on another woman.
Authorities have not released a motive for the school shooting or killing.
They say the teenager shot his 47-year-old father at their home on Wednesday afternoon before driving a pick-up truck three miles down a country road to Townville Elementary School.
The teenager had to make only two turns to arrive at the red brick school, where he crashed the truck, got out and started firing during the school's break.
Bullets struck two students and a teacher and the building was immediately placed on lockdown.
Superintendent Joanne Avery said staff saved lives by flawlessly implementing active shooter training drills conducted with students at Townville Elementary, which had been held as recently as last week.
Though shot in the shoulder, the teacher "was with it enough" to close the door, lock it and barricade the students, Ms Avery said.
"If he'd gotten in the school, it would've been a different scenario," she said.
The shooter then fired towards students in the playground but missed.
A teacher who heard the first gunshot was able to get those students safely inside, Ms Avery said.
Relatives of one of the wounded, six-year-old Jacob Hall, said he remained on life support in hospital.
His family issued a statement late on Thursday saying the boy sustained a major brain injury due to the amount of blood he lost after being shot in the leg.
His older brother, Gerald Gambrell, told The Greenville News that the family is "hoping for a miracle".
The shot teacher and another student who was hit in the foot were treated and released from hospital, officials said.
Classes are scheduled to resume at the school on Monday.