A grizzly bear linked to the death of a woman near Yellowstone National Park in July and a non-fatal attack in Idaho years earlier has been killed after the animal broke into a Montana home, officials said Wednesday.

The bear and a cub had broken through a kitchen window of an unoccupied home in West Yellowstone on Saturday and took a container of dog food, Montana Fish Wildlife and Parks said in a news release.

Officials shot the adult grizzly and captured the cub later Saturday evening "due to an immediate public safety threat from the bear’s food-conditioned behavior," the agency said.

The adult bear, a 10-year-old female originally captured for research in 2017, was genetically analyzed and confirmed to have killed 48-year-old Amie Adamson near Yellowstone National Park in July, officials said.

MONTANA MEN SURPRISE MOMMA BEAR WITH CUB, ENCOUNTER ENDS WITH ACCIDENTAL SHOOTING

Amie Adamson Facebook picture

Amie Adamson, 47, of Derby, Kansas, was found dead on a trail near Yellowstone National Park in July. Officials determined she was killed in a bear mauling. (Amie Adamson Facebook)

Officials determined the bear had also been involved in a 2020 encounter that injured a person near Henrys Lake State Park in Idaho.

"Both incidents were evaluated carefully at the time and deemed to be defensive responses by the bear," the agency said.

Efforts to capture the bear following the July attack were unsuccessful after wildlife officials found no sign of the animal.

A grizzly bear of Yellowstone Park

The adult grizzly bear, like the one pictured above, was shot after breaking into an unoccupied home in West Yellowstone, Montana, on Saturday. (Trevor Hughes / USA TODAY NETWORK, File)

Adamson, a former teacher from Kansas, was attacked along a trail used by hikers, horseback riders and off-road vehicles about 8 miles from West Yellowstone, a busy gateway community for the national park.

Adamson did not have bear spray, according to officials. The cause of death was excessive blood loss caused by a bear mauling, the coroner’s office said.

FLORIDA 3-LEGGED BEAR INVADES SCREENED-IN PATIO OF HOME, RAIDS REFRIGERATOR, DRINKS WHITE CLAW HARD SELTZERS

Meanwhile, the 46-pound male cub is being held at the agency’s wildlife rehabilitation center in Helena while arrangements are made to transfer the animal to a zoo.

Officials encouraged residents and visitors to "be bear aware" and warned that grizzly bear populations have denser and more widespread in Montana, increasing the likelihood of bear encounters.

Grizzly in Glacier National Park

Grizzly bear populations roam the Yellowstone region of Montana, Idaho and Wyoming. The bears can also be found around Glacier National Park in northwestern Montana. (iStock)

Grizzlies are protected under U.S. law outside of Alaska. Elected officials in the Yellowstone region are pushing to allow grizzly hunting, and in February the Biden administration took a preliminary step toward ending federal protections for the animals.

CLICK TO GET THE FOX NEWS APP

More than 1,000 grizzlies roam the Yellowstone region of Montana, Idaho and Wyoming. Roughly the same number live in northwestern Montana around Glacier National Park.

The Associated Press contributed to this report.