A teen's grandmother found his alleged plans to shoot up a high school with a semiautomatic rifle.
CNN  — 

A woman in Everett, Washington, was looking through her grandson’s journal Monday night when she found something that would forever change her view of him.

“I’m preparing myself for the school shooting,” he wrote, investigators said.

“I can’t wait. My aim has gotten much more accurate … I can’t wait to walk into that class and blow all those f****** away.”

The next morning, she called police. By that evening, authorities said, her grandson was in jail on attempted murder charges.

Based on his recent journal entries, police believe Joshua O’Connor was planning to shoot students at ACES Alternative High School, which he attended in Everett. And his grandmother is being hailed for potentially sparing the school from a tragedy like the shooting one day later at a high school in Florida.

“We are grateful for the grandmother’s role in preventing the tragedy from occurring,” said Andrew Muntz, spokesman for the Mukilteo School District. “In light of what happened in Florida yesterday, her actions demonstrate the importance of telling an authority if you hear or see anything.”

O’Connor, 18, had his first appearance in court Wednesday and his bail was set at $5 million. He did not enter a plea.

According to a Snohomish County probable cause document, O’Connor had been studying other mass shootings and bombings so he wouldn’t repeat others’ mistakes. Police said he also planned to use homemade explosive devices and wanted to die in the attack.

“I need to get the biggest fatality number I possibly can,” he wrote, according to investigators. “I need to make this count.”

Investigators said O’Connor wasn’t sure whether to carry out his plan at ACES High School or Kamiak High School, which are about 5 miles apart. He wrote in his journal that he made the decision by flipping a coin, they said.

Shocked and alarmed, O’Connor’s grandmother found a semiautomatic rifle inside her grandson’s guitar case. She told police her grandson recently purchased inert grenades he wanted to fill with black powder.

It appeared to her, court documents say, that he was close to executing his plan.

That’s when she decided to call police.

Officers arrived at the home and found two military grenades in O’Connor’s room, which led them to apply for a search warrant.

While the investigation was still underway, police said, O’Connor was pulled from class and arrested. While he was being transported, O’Connor pulled his hand from one of the cuffs and ran away from an officer but tripped and fell. As the officer tried to pick him up, O’Connor “mule kicked” the officer, police said.

He was booked into Snohomish County Jail for investigation of attempted murder and assault.

His public defender, Rachel Forde, told CNN she doesn’t believe police have sufficient evidence that O’Connor had taken a “substantial step” toward carrying out a murder.

“In this country we do not criminalize people for thoughts. We do not punish a teenage boy for venting in his diary. Based on what I have seen, the state has insufficient evidence that Joshua actually intended to act on those musings,” she said.

“Owning legally obtained weapons alone is not an indication that Joshua intended to act on the things he was venting about in his diary. The weapons that Joshua allegedly possessed were not specifically designed for an unlawful use and can serve a lawful purpose.”

Meanwhile, police are praising the grandmother for coming forward.

“It is important to remain observant about odd or peculiar behaviors with our children, or with fellow students,” said Officer Aaron Snell, an Everett police spokesman. “In Everett, we were fortunate enough that a family member believed there were credible threats and contacted law enforcement for further investigation.

“The decision was most probably difficult, but was the correct one in this case.”

O’Connor’s arrest took place the day before 17 people were shot and killed at Marjory Stoneman Douglas High School in Parkland, Florida. Investigators say the suspected shooter, Nikolas Cruz, had posted “disturbing” statements on social media prior to the shooting.

CNN’s Dave Alsup and Brandon Griggs contributed to this story.