An 18-year-old high school student in Washington state was arrested this week after his grandmother reportedly found his journal with detailed plans for a school shooting.

Joshua O'Connor's grandmother called 911 on Tuesday, the day before a deadly high school shooting in Florida, saying she believed her grandson had plans with "upcoming and credible threats."

Excerpts from the journal detailed how O'Connor planned to shoot students and use homemade explosives at ACES High School in Everett, Wash., police said.

Officers were alarmed when they reviewed the journal, where O'Connor reportedly wrote about how often he thought about his plan and wanted to make it "infamous" by causing the "biggest fatality number I possibly can," The Everett Daily Herald reported.

"I can't wait to walk into class and blow all those [expletives] away," the journal reportedly read.

O'Connor wrote that he had been preparing by "reviewing many mass shootings/bombings (and attempted bombings) I'm learning from past shooters/bombers mistakes."

When detectives searched the grandmother's home, they also found an AK-47 hidden in a guitar case and military-style grenades.

When O'Connor was arrested at school, he was found carrying marijuana and a knife, police said.

He was booked into the Snohomish County Jail on probable cause for attempted murder due to "planning and taking substantial steps," police said. He is being held on $5 million bail.

O'Connor had no prior criminal history but was believed to have used the same AK-47 to rob a convenience store just days before, writing about how powerful he felt after scaring the female clerk, the Daily Herald reported.

Mukileto School District spokesman Andy Muntz praised the grandmother's actions, saying they were incredibly grateful she turned him in.

"It really speaks to the [importance] of if you see something or hear something to notify authorities," Muntz said. "That's what she did. It could well have saved many, many lives, including her grandson's life."

The grandmother's 911 call came the day before a 19-year-old opened fire on a Florida high school, killing 17 people and wounding dozens of others.

Nikolas Cruz was a former student of Marjory Stoneman Douglas High School in Parkland before being expelled. He had reportedly brought ammunition to school in his backpack and talked often about weapons.

On Thursday, President Trump suggested Cruz was mentally ill.

Cruz has been charged with 17 counts of premeditated murder.