On March 23, the father of the suspect, Nichole Cevario, 18, told officials at Catoctin High School in Thurmont, Maryland, about a "potential threat of violence toward the school," the Frederick County Sheriff's Office said, and his daughter, a senior, "was immediately removed from the classroom and turned over to investigators."
Authorities said investigators then searched Cevario's home, where they found a diary that indicated she planned to carry out a mass shooting at her high school less than two weeks later, on April 5. Her diary mentioned the 1999 Columbine High School shooting in Littleton, Colorado, and the 2012 Newtown, Connecticut, elementary school shooting, Frederick County Sheriff Charles Jenkins told ABC News.
Jenkins added of the suspect's parents, "I can't tell you how thankful I am that they stepped forward, offered this information to school administrators and contacted us. Without their help with this thing, we would have been dealing with an aftermath, rather than averting.
As a parent himself, Jenkins said that "it would be extremely hard to make that decision." He added of Cevario's parents, "They most likely saved their daughter's life as well as other lives within the student body."
An ABC News investigation found that in the last 17 years there have been at least 79 thwarted school massacre plots and that in more than half of them, the would-be attackers mentioned Columbine.
The sheriff's office said Cevario's journal showed she had been plotting the alleged attack "for some time and had been compiling intelligence on behavior activities of the school, noting emergency procedures associated with drills conducted by school staff and obtaining intelligence on the school resource deputy." The journal had a timeline, and her expectations for each stage, the office said.
Authorities searching Cevario's home also found a shotgun with ammunition and "bombmaking materials to include pipes with end caps, shrapnel, fireworks, magnesium tape and fuse material," the sheriff's office said.
"I have no doubt based on what we saw in her diary, the evidence we found, the information that we have taken throughout the investigation, that this was going to occur ... April 5," Jenkins said.
When Cevario was removed from the school on March 23, it appeared that she posed a threat to herself, and she was taken to a hospital, where she remains, the sheriff's office said. The office said she is struggling with mental health issues.
According to the diary, she planned to die in the attack, officials said.
Investigators secured an arrest warrant for possession of explosive material with intent to create a destructive device and possession of incendiary material with the intent to create a destructive device, the sheriff's office said. The arrest warrant will be served when Cevario is released from the hospital, the sheriff's office said.
The office did not know whether she has retained a lawyer.
Jenkins said all the items Cevario bought were legal. Authorities said no one else was involved in or knew of the alleged plot.
There was never a weapon or explosive device on school property, authorities said, and the materials were never combined into an explosive device.
In a video Monday on the school district's YouTube page, Terry Alban, the superintendent of Frederick County Public Schools, thanked Cevario's "courageous" parents for stepping forward.
"Whenever you hear or see anything that raises concern, you need to trust us and come to us so that we can do the right thing and handle it, just like we did in this case," Alban said. "Those relationships, that trust — that's what enables the policies and the procedures that we have put in place to keep our school safe work. And they did."
Brad Young, the president of Frederick County's Board of Education, said in a statement, "We are blessed that these efforts resulted in thwarting a potentially disastrous situation. We are thankful for the cooperation of the family, the school and law enforcement in preventing this."
ABC News' Pierre Thomas and Geneva Sands contributed to this report.