BENSON, N.C. (WNCN) — A Johnston County father pleaded guilty Thursday after his toddler died from a self-inflicted gunshot wound to the head in October, according to a release from the Johnston County District Attorney’s Office.

County District Attorney Susan Doyle said Warren Tyler Oser, father of two-year-old Warren Bennett Oser, pleaded guilty to failure to store firearms to protect a minor, a class 1 misdemeanor.

He was placed on supervised probation and ordered to perform community service to promote gun safety around minors, according to a news release.

Doyle’s office said the toddler died Oct. 16 from a single gunshot wound to the head after finding his father’s loaded Smith & Wesson 40 caliber handgun.

Get crime updates in your inbox – Sign up for CBS 17’s Crime Tracker newsletter

Sheriff’s deputies responded to the shooting in the 900 block of West Watson Road in Johnston County just before 6 p.m. on Oct. 16.

According to the sheriff’s office, the 2-year-old was suffering from a gunshot wound to the body and was found near a vehicle in the back of the property.

The District Attorney said the child found the gun in the front seat of his father’s truck.

At the time, detectives said the child had “climbed into his dad’s pickup truck through an open door, and was playing with a loaded handgun that was inside the vehicle. The child was able to discharge the weapon, which resulted in injuries to himself.”

Upon further investigation, the sheriff’s office said that three guns with no safety mechanisms engaged were left unattended in Oser’s truck.

They said Oser was nearby fixing a lawnmower when his son got into the truck, and immediately called 911 and cooperated with law enforcement.

MORE FROM CBS 17

JOHNSTON COUNTY NEWS

See the latest news from Johnston County

The toddler died later that night, according to deputies.

During Thursday’s hearing, Assistant District Attorney Jason Waller told the Court that the District Attorney’s Office needed to “balance sympathy for the loss of a beloved son against the need to promote gun safety and responsibility, especially around minors, in Johnston County.”

Waller said the District Attorney’s Office hopes the case will help prevent other senseless child deaths by serving as a reminder that gun owners have a lawful duty to secure weapons around children.