Police shot and killed an armed woman and a dog Thursday, May 30, in an Ontario neighborhood.

Officers were called just before 2:20 p.m. about a woman with a gun threatening to kill herself in the 400 block of West Maple Street, Ontario police said.

A police helicopter found her in the back of a home standing on the roof of a small building holding a machete and a handgun, Ontario Officer Eliso Guerrero said.

A male family member tried unsuccessfully to take the weapons away from the woman.

Officers saw the two struggling over the gun and entered the backyard with a police dog, Kerel.

“Once inside the backyard, a large dog at the location attacked the police K-9,” Guerrero said in a statement. “Officers were forced to shoot the dog.”

The officers continued to the back of the home, where the woman was holding a handgun and a metal pipe. She kept walking toward the officers and refused to put down the weapons, which led to the shooting, Guerrero said.

Ontario firefighters treated the woman, who was then taken to a hospital, where she was pronounced dead.

Police said the gun, the metal pipe and the machete were all recovered at the scene.

Kerel, an 8-year-old Belgian Malinois, was taken to a veterinarian with minor injuries to his right-rear leg and was expected to make a full recovery, Guerrero said.

Anyone with information about the case was asked to call Ontario police at 909-986-6711. Anonymous tips can be submitted to 1-800-78-CRIME or at wetip.com.