The Butte County Coroner's Office identified the boy who drowned in a Gridley canal Tuesday as Nathanael Long, 12, from Oroville.

According to the Butte County Sheriff's Office the boy was swimming in an irrigation ditch a little after 3 p.m. Tuesday southeast of Gridley near Humble and Archer Avenues when he became trapped in a pipe.

Officials said Long was underwater for near 30 minutes before help arrived. Life saving measures were performed on the boy but he succumbed to his injuries at a local hospital.

The Butte County Sheriff's Office is asking residents to avoid swimming in irrigation canals or ditches saying it is not only illegal but unsafe due to unseen hazards.