LOGAN TOWNSHIP, N.J. (AP) — An armed man who entered a UPS processing facility Monday morning and held two women hostage for several hours was shot and killed by police as he left the building with the women, authorities said.

Several officers fired at William Owens, 39, of Sicklerville, New Jersey, the state Attorney General’s Office said in a news release that did not detail the situation or explain why the suspect was shot.

Owens had entered the business at about 8:45 a.m. and fired shots, which did not strike anyone, before taking the women to a room and barricading himself inside with them, authorities said. Officials believe that Owens had a prior relationship with one of the hostages, Gloucester County Prosecutor Charles Fiore said.

The women escaped without serious injuries after the standoff in Logan Township, about 20 miles (30 kilometers) south of Philadelphia, Fiore said.

“Multiple members of law enforcement fired at the man, who was armed with a handgun. He was pronounced dead at the scene,” the news release said.

Earlier in the day, Fiore said the suspect had been taken to a hospital after being shot but that his condition was not known.

“I heard one of my fellow employees say, ‘Run, he’s got a gun,’ then I heard the little pop of the gun, I guess, and we all ran and law enforcement took over,” employee Allen Anthony Dowling said.

Police evacuated the building and blocked access to the busy industrial park, and nearby schools were put on a modified lockdown.

Hostage negotiators talked to the suspect by phone as he held the women captive. Television news footage showed officers crouched behind a vehicle behind the building’s loading dock at the time.

Shortly before noon, as Fiore held a news conference at a township building about 8 miles (12 kilometers) away, a short burst of gunfire was heard at the scene. Fiore later said he didn’t know how many shots police fired or whether the gunman fired any shots.

“There was an intervention,” FIore said. “He did not surrender.”

Police trained in hostage situations, he said, “would make a determination as to whether or not it’s appropriate to intervene, using force at any point in time.”

Gail Wright, a woman at the scene who described herself as the suspect’s cousin, described him as “a good guy.”

“He must have felt forced, otherwise, he wouldn’t have done this,” she said.

In addition to UPS, other major companies including Amazon and U.S. Foods have operations in the area, Mayor Frank Minor said. The township has about 6,500 residents, but some 18,000 people are in the area each workday, he said.