A male student was arrested at Danbury High School Wednesday after officials say he was threatening a female student and bullets were found in his possession.

The school resource officer learned of the threat around 12:15 p.m. that day.

During an investigation, police officers and school administrators found bullets and marijuana in the trunk of the student’s car, police said.

A handgun was later found in the male student’s bedroom after his parents gave consent for the search, police said.

He was arrested and then transported to juvenile detention pending a hearing.

He is charged with threatening, criminal possession of a pistol or revolver, breach of peace (threatening), alteration of firearm identification markings, possession of a controlled substance and possession of a controlled substance with intent to sell.