A 37-year-old Danvers man was fatally shot by police Thursday night in the Avalon Danvers complex on the site of the former Danvers state hospital, officials said today.

Scott Kehoe was armed with a knife and lunged toward an officer during a confrontation. At that point, officers “deployed lethal force,” according to preliminary investigation, Essex District Attorney Jonathan Blodgett’s office said in a statement.

Kehoe was transported to Beverly Hospital, where he was pronounced dead, prosecutors said.

Advertisement - Continue Reading Below

Prosecutors promised a “full and impartial review” of the shooting.

“The community can count on a thorough investigation by our office,” Blodgett said in the statement. “In all cases of use of fatal force, transparency is critical. As we have in prior investigations of police-involved shootings, community stakeholders and members of the media will have the opportunity to review our written findings when the probe is complete.”

Danvers Police Chief Neil F. Ouellette said his officers were dispatched to the 5000 block of Kirkbride Drive in Danvers to investigate an alleged assault around 9:52 p.m.

“The ensuing investigation indicated that a robbery had occurred and, as officers were attempting to place the suspect into custody for that, as well as existing trial court warrants, an officer-involved shooting occurred,’’ Ouellette said in a statement. “The suspect was shot.”

Blodgett’s office said the incident involved five Danvers officers and one state trooper. During the confrontation, prosecutors said, Kehoe approached officers and repeatedly tried to stab them.

Officers told Kehoe, who was a Kirkbride Drive resident, to drop the knife, but he “eluded capture and lunged toward an officer. At this point, officers deployed lethal force to stop Kehoe,” prosecutors said.

An autopsy is being conducted by the state medical examiner, prosecutors said.

Ouellette, the police chief, said the initial altercation that drew police into the neighborhood was not random, and that the public should not be concerned about an ongoing crime issue.

“Residents in the area should be assured that there is no risk to their safety and the initial assault was not a random event,’’ Ouellette said in the signed statement.