RIPON (CBS13) — Two Ripon teens are behind bars after one reportedly brought a gun to school on Monday.

The incident was caught on camera and prompted an investigation, leading detectives to the discovery that another student sold the first juvenile the recovered handgun.

READ MORE: Folsom Ice Rink Opens After Three Week Delay Due To Vandals

Police say on Monday evening they learned about the incident at Ripon High School where a student brought a handgun to school. Officers contacted the student at his residence where they took him into custody and recovered the handgun.

READ MORE: Sacramento Kings Rout Shorthanded Clippers 124-115

READ: Woman Found Dead In Citrus Heights Apartment

The student was booked into the San Joaquin Juvenile Hall for having a firearm at school and unlawful possession of a firearm.

MORE NEWS: Folsom Ice Skating Rink Reopens After Weeks Of Delays

Investigators then learned the handgun was sold to the student by another juvenile. Detectives served an arrest warrant for that juvenile on Wednesday afternoon and found various illegal narcotics and evidence of drug sales at his home. He was also booked in Juvenile Hall on charges of possessing a firearm and possession of narcotics for sale.