Police who fatally shot a gunman who had taken his ex-girlfriend and another woman hostage at a UPS facility in Logan Township, Gloucester County, last year were justified in doing so, the New Jersey Attorney General’s Office announced Wednesday.

William Owens, 39, of Sicklerville, was shot by seven members of the Gloucester County SWAT Team outside the UPS Mail Innovations facility on Birch Creek Road.

The investigation into the January 2019 shooting found that officers shot Owens after he fired a handgun at one of the two women he took hostage, the office said in a statement.

Director Thomas J. Eicher of the attorney general’s Office of Public Integrity and Accountability concluded that the use of force was justified because the officers reasonably believed their actions were immediately necessary to protect the hostage and others from death or serious bodily harm, the office said.

Authorities said the names of the officers are not being released because threats have been made against them.

The investigation included witness interviews, video footage of events leading to the shooting and forensic evidence from the scene. There was no video of the police shooting itself, officials said.

About 8:30 that morning, Owens, a former UPS employee, went to find his ex-girlfriend, who was working at the facility, authorities said. He approached her outside, then followed her into the building, armed with a 9mm handgun, investigators said.

Once inside, he grabbed her, fired the gun into the air, and announced that he was taking her hostage. He pistol-whipped a security guard and said he was going to kill his ex-girlfriend, and threatened to “kill everyone in this building,” the Attorney General’s Office said.

Owens then took a second employee hostage, pointed his gun at various other people, saying he would kill everybody, and fired at least two additional shots while inside the building, causing employees to flee in terror, the office said.

During a lengthy standoff with police officers who tried by phone to negotiate a surrender, Owens kicked and pistol-whipped his ex-girlfriend and terrorized both hostages, including repeatedly pointing his gun at their heads, state investigators found.

The two women were eventually able to escape. But when the ex-girlfriend, bleeding from the beatings she endured, ran out of the facility, Owens followed her and fired his gun at her, authorities said.

That’s when the SWAT officers fired their weapons, killing Owens, who was declared dead at the scene. An autopsy revealed that he had 29 gunshot wounds. No one else was shot, authorities said.