WEST BABYLON, N.Y. (AP) — Police say a man in custody after a dispute with his neighbor was shot twice with a Taser stun gun in a prison cell and died.

Suffolk County police say officers used the electrical weapon in an attempt to subdue 40-year-old Daniel McDonnell after he began “acting irrationally” Friday morning while being held in a police station cell.

READ MORE: NYPD: Suspect Hit Officer In Face During Attempted Arrest Near Washington Square Park

After the Taser, police say McDonnell suffered “respiratory distress” and was pronounced dead at a hospital.

Authorities say his death is being investigated.

READ MORE: Police: Witnesses Stop Drunk Man From Pushing Asian Woman Onto Subway Tracks In Brooklyn

The Taser was initially conceived as an alternative to deadly force. In practice, it’s often fired by police officers hoping to avoid a physical struggle or to get someone to comply with an order.

McDonnell was arrested Thursday after a dispute with a neighbor in Lindenhurst.

MORE NEWS: 12-Year-Old Shot In Brooklyn Remains Hospitalized, Police Searching For Gunman

(Copyright 2011 by The Associated Press.  All Rights Reserved.)