ISLA VISTA (CBSLA.com) — A UC Santa Barbara student was arrested Tuesday after he allegedly fired a gun inside his apartment.

Kevin Tym, 21, was taken into custody for negligent discharge of a firearm and possession of high capacity magazines. His bail was set at $2,500.

READ MORE: Sheriff's Deputies Investigating Kidnapping In Palmdale

Santa Barbara County sheriff’s deputies responded to an apartment in the 6500 block of Pardall Road around 2:30 p.m. after someone reported a bullet had gone through their wall.

READ MORE: LA Film Production Sees Boom In 2021

Deputies went to the suspect’s apartment and spoke with Tym, who admitted he was playing with his handgun went it accidentally went off, authorities said.

Tym was found in possession of seven firearms and approximately 1,000 rounds of ammunition. In addition, he had high capacity assault rifle magazines.

MORE NEWS: Health Officials Urge Residents To Exercise Caution Against COVID-19 While Watching Games

All of the firearms were legally owned by Tym, officials said.