A Massachusetts man who grabbed his crossbow in an effort to stop a dog attack accidentally killed his neighbor in the process.

State police are investing what was described as an accidental death Wednesday afternoon after multiple 911 calls came in about a mauling in the town of Adams, north of Pittsfield, according to a statement from the Berkshire District Attorney's Office.

A man, who was not identified, shot his crossbow in an attempt to stop his neighbor, identified as Joshua Jadusingh, 27, from being mauled by two adult dogs after hearing a commotion.

"The arrow struck one of the dogs, went through a door, and then struck the individual being mauled as he was attempting to barricade himself from the attack," the district attorney's statement said.

Download the NBC News app for breaking news

The statement said the man with the crossbow stood at the bottom of a stairwell and fired up at a dog on the landing. A young girl in another room was unharmed.

The dogs belonged to the man who died and his girlfriend, and both animals apparently had histories of being aggressive, the district attorney's office said.

Adams police officers who responded to the scene used their guns to "neutralize the animals," according to the statement.

The man who fired his crossbow had a license to own the weapon, used for hunting, and is cooperating with authorities.