A judge has set bond at \$75,000 (£46,000) for an Alabama teenager accused of planning to attack classmates and a teacher using homemade explosives.
Derek Shrout, 17, appeared in court Monday on a charge of attempted assault.
Russell County Sheriff Heath Taylor says the teen was arrested after a teacher found a journal that appeared to describe the plot.
He says the teen told investigators that he was a white supremacist and most of the alleged targets he named were black.
Shrout's attorney and family said they planned to post bond by the end of the day.
The judge ordered the teen not to contact anyone at Russell County High School in Seale, eastern Alabama, or use the Internet without supervision.
Mr Taylor told The Associated Press he believed the shooting in Newtown, Connecticut, was a factor in Shrout's alleged planning.
The sheriff said the first date in Shrout's journal describing the plot was dated December 17 - three days after 20 children and six adults were gunned down inside Sandy Hook Elementary.
A search of Shrout's home found several small tobacco cans and two large cans, all with holes drilled in them and containing pellets.
Mr Taylor said all they needed were black powder and fuses to become explosives. The journal also allegedly mentioned using firearms. The sheriff said Shrout's father owned a few household weapons, like a hunting rifle, a shotgun and a handgun.
"He just talks about some students, he specifically named six students and one faculty member and he talked about weapons and the amounts of ammunition for each weapon that he would use if he attacked the school," Mr Taylor said.
The sheriff said he did not believe the teen's initial claim that the journal was a work of fiction
He said: "When you go to his house and you start finding the actual devices that he talked about being made, no it's not fiction anymore. Those devices were - all they needed was the black powder and the fuse - he had put a lot of time and thought into that."
Mr Taylor praised school officials who discovered the journal and notified authorities.
"The system worked and thank God, it did," he said. "We avoided a very bad situation."