CHICAGO (CBS) — The teenage son of a Will County pastor accidentally shot and killed his 15-year-old cousin late Tuesday night, when the two thought they heard someone breaking into the church, and took a loaded gun to investigate.

Wilmington police and Will County Sheriff’s officers were called to the Christian Faith Center at 1800 S. Water St around 11:45 p.m., after someone called 911 reporting a boy had been shot.

When officers arrived, they found family members administering CPR to a 15-year-old boy who had been shot in the armpit, according to Will County Sheriff Mike Kelley.

The boy was having a sleepover with his 17-year-old cousin at the home attached to the church, when they heard a noise they believed to be someone trying to break into the church, and went to investigate with a loaded gun, Kelley said.

As the two were running towards the church’s gym, the 17-year-old boy tripped on an extension cord, causing the gun to go off one time. The bullet struck the younger boy under the arm, according to Kelley.

Family members, police, and paramedics tried to save the 15-year-old, but he was pronounced dead at Riverside Hospital in Kankakee, Kelley said.

Police and prosecutors decided not to press charges against the older boy, who is the son of the church’s pastor.

“It was determined that this was a tragic accident. The 17-year-old was released to his parents without charges,” Kelley said.

The boy has a valid Illinois Firearm owners Identification card, according to Kelley. The gun belongs to his father. Police said the pastor owns more than one gun, but the boys grabbed only the rifle from a closet when they heard the noise.

Police said, while the two are cousins, the boys considered themselves more like brothers.

Investigators did not find any evidence of an attempted break-in.