A pair of assault rifles, nearly 100-high-capacity magazines and two handguns were discovered in the home of a 17-year-old who was arrested for threatening to open fire at his school in California.

Security guard Marino Chavez reported the teenager to police after he overheard him saying that he was “going to shoot up the school sometime in the next three weeks.”

He made the comments at the El Camino High School in Whittier, two days after 17 people were killed when a gunman opened fire on a Florida high school.

Mr Chavez said when he asked the student about the threat, he confirmed he made it but said he was just kidding and did not mean it.

He had apparently been angry a teacher told him he could not wear headphones in the classroom, the guard said.

“I’m not a hero. I was just doing my job,” Mr Chavez told a press conference.

Los Angeles County Sheriff’s patrol cars leave El Camino High School in Whittier, California (AP Photo/Reed Saxon)

Although the boy claimed his comment was a joke and investigators did not uncover a specific plot, Los Angeles County Sheriff, Jim McDonnell said it showed the need to take every potential threat seriously.

“This is an example of something that could have potentially went down that path, but didn’t,” he said. “As we see these incidents occur one after another, we’re all looking to say how do we stop this?”

The 17-year-old’s brother is facing charges of possession of an assault weapon, importing a high-capacity magazine and other violations (AFP/Getty Images)

When police searched the teenager’s home, they found two AR-15 rifles, 90 high-capacity magazines and two handguns, including one left in a hallway laundry basket, the sheriff said.

He had an extensive disciplinary history at the school, was arrested on suspicion of making a criminal threat and was in custody, Sheriff McDonnell added.

His 28-year-old brother, told deputies he purchased the guns while serving in the Army in Texas. One of the rifles was not registered, which is a felony in California, Sheriff McDonnell said.

The brother is facing charges of possession of an assault weapon, importing a high-capacity magazine and other violations.

“We take all the threats we receive seriously,” Sheriff McDonnell said. “Anytime we can get a chance to prevent something like that happening, we all come away from that very relieved.”

Florida school students form giant human heart to honour Parkland shooting victims

A national organisation that tracks school threats said it has recorded around 50 a day on average since the Florida shooting, compared with about 10 a day on average.

School threats since the Florida shooting include dozens on social media, about 10 incidents where a gun was brought to school and 22 bomb threats, said Amy Klinger, director of programmes for the Ohio-based Educators School Safety Network.

An Oregon high school student was arrested on suspicion of disorderly conduct after police said he sent a social media message to a girl at another high school reading: ”I am the shooter!”

The 15-year-old boy has claimed the message was a joke.

Florida shooting – in pictures Show all 10 1 /10 Florida shooting – in pictures Florida shooting – in pictures Police arrest a suspect in connection with the shooting at the Marjory Stoneman Douglas High School in Parkland, Florida Reuters Florida shooting – in pictures Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida AP Florida shooting – in pictures Anxious family members wait for news of students AP Photo/Wilfredo Lee Florida shooting – in pictures Students being evacuated from the school AP Florida shooting – in pictures Students being evacuated from the school Getty Florida shooting – in pictures People gather waiting for word from students AP Florida shooting – in pictures Parents waiting for news on their children AP Florida shooting – in pictures People gather at a hotel where students were taken after the shooting Getty Florida shooting – in pictures Florida Governor Rick Scott speaks to the media as he visits Marjory Stoneman Douglas High School following the shooting AFP/Getty Florida shooting – in pictures Dr. Igor Nichiporenko, Medical Director Trauma, left, and Dr. Evan Boyer, Medical Director, Emergency Services, speak about treating victims and the suspect at a press conference outside Broward Health North hospital AP

A Montana high school student was also charged with intimidation and assault with a weapon over numerous threats to “shoot up the school.”

Court records say the 18-year-old told investigators he was joking and regretted frightening students.

Another teenager in Vermont pleaded not guilty last week to attempted aggravated murder and other offences after writing in a diary he had “big plans” to kill as many as he could at his former high school.

In Northern California, police said they recovered a firearm from the home of an 11-year-old boy who had barricaded himself in a Santa Cruz classroom and planned to harm specific students.