Irving Silverstein, Associated Press
New York investigators mark the scene of a gunbattle involving a retired officer who fled a psychiatric hospital.

NEW YORK — A retired police sergeant whose erratic behavior frightened his family into committing him to a psychiatric hospital fled the ward Tuesday and was killed by officers during a gunbattle outside his home.

The barrage of gunfire turned a Staten Island neighborhood into a live shooting gallery, with officers firing 19 shots at the distraught former officer, who shot eight rounds and died within a few feet of his three children, ages 3, 5 and 7.

The shoot-out came hours after Jason Aiello's cousins and wife took him to the psych ward because they were concerned about his increasingly bizarre behavior. Aiello kept quoting Scripture and said he needed to get away and take his family out of the city for safety's sake, police said.

The hospital where Aiello was committed Monday night called 911 on Tuesday morning, saying he had walked out and likely had access to weapons.

Shortly afterward, Aiello's mother called 911, reporting he was holding his wife and three children hostage at his home.

When two officers from Aiello's former precinct responded, he was in the street arguing with his wife about taking the children away, police said. The couple's children were in the family minivan on the street.

Officers trying to handcuff him said Aiello broke free and pulled out a gun.

"Jason, put the gun down," one of the officers said, according to the police account.

Instead, Aiello fired twice at the officers as he ran toward a cousin's SUV across the street, police and witnesses said. The officers returned fire.

The officers returned fire as Aiello got into the car; one officer fired nine times, the other 10.

Aiello's wife ran to the SUV amid the gunfire and got in the passenger's side to try to stop her husband, police said.

The retired officer fired six more times before he was killed. He was hit twice in the shoulder and back and was grazed in the head, police said. No one else was hurt.

Chief police spokesman Paul Browne said the shooting appeared to be justified. A preliminary investigation showed the officers faced an imminent threat of serious physical injury or death.

Aiello's family members and their attorney disputed the NYPD's account and say police used "more than excessive" force.

Attorney Peter Antioco told the Staten Island Advance that Aiello's wife took the gun away from her husband while they were in the car and yelled at police not to shoot.

The former sergeant was on the force for 12 years and retired in 2006 on disability because of a knee injury, police said. He apparently had no history of emotional problems.

He had recently worked as a bodyguard for his friend, jeweler Louis Antonelli, who was gunned down outside a Staten Island restaurant in April. FBI officials said that they believe Antonelli had a business relationship with members of the Genovese crime family, and that the hit may have been ordered by one or more members of the family.

Aiello had been questioned recently about the slaying but was not charged in the case, prosecutors said. It's unclear whether that episode contributed to his emotional unraveling.