A 14-year-old boy was sentenced to one year in juvenile hall Wednesday for the death of his friend, according to a news release from the Butte County District Attorney’s Office.

The charges stemmed from an Oroville Police Department investigation that found that the boys, who were friends, were playing with a semi-automatic handgun in the defendant’s bedroom on June 4.

According to the news release, the boy told officers he and his friend had found the gun in a nearby field known locally as Stumps Field. He said that after they finished playing, they were leaving the bedroom when he threw the gun onto his bed. The gun discharged, and a bullet hit his friend in the head. A family member heard the gunshot and called 9-1-1. Oroville police and medical personnel arrived and transported the boy directly to Enloe Medical Center, and he died there.

The boy admitted to a felony charge of involuntary manslaughter and a misdemeanor charge of possession of a handgun by a minor on July 2. He was sentenced to one year in the Butte County Juvenile Hall.