A 6-year-old boy is in serious condition after he was accidentally shot by his 4-year-old neighbor in New Jersey Monday night, police said.

The 4-year-old shot his 6-year-old neighbor with a .22-caliber rifle outside the younger child’s home, Sgt. Robert Rankin of the Toms River Police Department told the Associated Press. The 4-year-old’s parents were home when the shooting occurred Monday night.

Police said a single shot was fired from 15 yards away and struck the 6-year-old in the head, the Star-Ledger reported.

The names of the children involved were not released by authorities.

Police were still investigating the incident, and it wasn’t clear whether the 6-year-old pulled the trigger on the rifle or if it accidentally discharged.

Authorities were mulling whether to file any charges in the case.

The children were outside the Toms River home when the younger boy went inside and retrieved the rifle, Toms River Police Chief Michael Mastronardy and Ocean County Prosecutor Joseph Coronato told the Star-Ledger.

The 6-year-old was hospitalized at Jersey Shore University Medical Center in Neptune, N.J., the newspaper reported.

It’s unclear whether the gun used in the shooting was legal.