A New York man died after being nearly decapitated by a booby trap he set to protect marijuana plants on his property.

Daniel R. Ricketts, 50, who owns property and a residence on Saw Mill Road in Albany County, was identified as the victim on Sunday, the Times Union reports.

Albany County Sheriff Craig Apple said Ricketts was driving an ATV on his property on Saturday afternoon when he was nearly decapitated after running into a nearly invisible wire that was part of fortifications he made near four large marijuana plants.

The wire appeared to be the type used in pianos, but Apple said it’s unclear what purpose it served as a security measure. Other components of the booby traps included barbed wire and a leg trap similar to those used to trap coyotes.

Alcohol may have been a factor in the accident, Apple said. An investigation is ongoing.

Click for more from TimesUnion.com.