JACKSONVILLE, Fla. – A shotgun-wielding man who was shot and killed Thursday in Oceanway by a veteran Jacksonville police officer had tried to shoot a woman in the head twice before officers arrived, the Jacksonville Sheriff's Office said Friday.

Witnesses told police that Jacob DePetris, 29, fired a shotgun into the home of his ex-girlfriend's relatives and then threatened a man and woman inside the home, which is on Shims Road, just north of New Berlin Road.

DePetris fired through a window in a side door of the home that leads to the laundry room and then let himself into the home just before 7 a.m. Thursday, police said. The shotgun pellets hit the washer and dryer in the room.

Police said the man and woman in the house heard the noise and confronted DePetris, who threatened them and demanded to know where his ex-girlfriend was.

The two retreated to the master bedroom and locked the door, and the man tried to load his own shotgun but had trouble, police said.

The man then ran out of the bedroom with his cellphone to call police as the woman locked herself in the master bathroom and hid in the shower, police said.

DePetris kicked in the bathroom door, put the shotgun to the woman's head and pulled the trigger, but the gun misfired, JSO Undersheriff Pat Ivey said.

He then took the woman at gunpoint out into the front yard and told her to call the man back before putting the shotgun to her head again and pulling the trigger. The gun again misfired, Ivey said.

"He had a fully functioning proven weapon that would fire, shooting into the home, and then for some reason, divine intervention, whatever you want to call it, his weapon would not fire again," Ivey said.

After the second misfire, the woman ran to a back residence on the same property as DePetris fumbled with the shotgun in one hand and a large bottle of liquor in the other, police said.

She and a relative who lives in the back residence also called police and were on the phone with the dispatcher when Officer Howard Smith arrived at the scene in his marked police car.

Smith, a 27-year veteran of the JSO, encountered DePetris outside as he was headed to the second residence on the property. DePetris refused Smith's repeated orders to drop the shotgun and appeared to raise it instead, according to witnesses and the officer.

Smith then fired twice, hitting DePetris in the torso. Ivey said it's unclear how many times DePetris was hit.

“By (witness) statements, Officer Smith saved lives,” Ivey said. “That coupled with the malfunctioning of his own weapon, whatever caused that, those two things saved lives.”

Another officer who arrived at the scene tried to give first aid to DePetris, but he died at the scene.

Troubled history

A friend of DePetris' arrived at the scene late Thursday, after hearing about the shooting.

"I am just heartbroken. It hurts so bad, " said Matthew Manor.

Manor told News4Jax he worked with DePetris at a local overhead door company.

"He said he just couldn't live without his girl and his family. I can't even imagine what he went through," Manor said.

Even more unsettling, Manor said DePetris has shared some deeply personal thoughts with him.

"He shared with me a while back that he wouldn't just go to jail if it ever came down to it. He would make the police take his life," Manor said.

News4Jax searched jail records and found arrests for trespassing, criminal mischief, DUI and other arrests, but DePetris was never charged with any violent offenses in Duval County. Ivey said Friday that DePetris also had run-ins with law enforcement in Nassau County, in Georgia and in Colorado.

A neighbor said DePetris had a child with the woman that police said he was looking for when he went to the house.

This was Smith's first officer-involved shooting. He is on administrative leave while the incident is investigated.

This was the ninth shooting by a Jacksonville officer this year, and the third person killed by an officer's gunfire.