Montana wildlife officers and law enforcement euthanized a bear that was involved in a fatal attack on a woman over the summer after the grizzly was caught trying to break into a home, officials said.

A West Yellowstone homeowner reported a bear with a cub broke through a kitchen window Saturday morning and removed a container of dog food from inside the house, according to the office of Montana Fish, Wildlife & Parks (FWP).

The agency said in a release it sent staff and local officers to the scene and, with the authorization of the U.S. Fish & Wildlife Service, shot the 10-year-old female grizzly "due to an immediate public safety threat from the bear’s food-conditioned behavior."

File image of a wild grizzly bear in Yellowstone National Park, Wyoming, Oct. 21, 2010. Newsbase/AP Photo, FILE

The cub, who was right next to its mother when it was shot, was taken to the FWP’s wildlife rehabilitation center in Helena and is awaiting a transfer to a zoo, according to the agency.

MORE: Woman found dead after suspected bear encounter near Yellowstone, wildlife officials say

Through genetic analysis and "other identifying characteristics," FWP said it confirmed the slain grizzly is the same one that killed Amie Adamson, 47, of Derby, Kansas, in July.

Adamson's body was found on July 24 on Buttermilk Trail west of West Yellowstone, according to officials. Adamson worked at Yellowstone for the summer and was on a morning hike when the attack happened, her mother said in a statement.

The bear, which was captured in 2017 by Montana wildlife officials for research purposes, was also linked to an encounter in Idaho that injured a person near Henrys Lake State Park in 2020, FWP said.

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

File image of Yellowstone National Park. STOCK PHOTO/Getty Images

FWP said that multiple efforts to trap and remove the bear were made after the July attack but were unsuccessful.

MORE: Bear euthanized after attacking 7-year-old boy in New York, authorities say

The agency warned that the grizzly population in the state is increasing and becoming more dense which is leading to more encounters with humans. It urged residents and visitors to take precautions and carry bear spray in the wild.

"This time of year is when bears are active for longer periods as they consume more food in preparation for hibernation," FWP said in a statement.

ABC News' Teddy Grant and Peter Charalambous contributed to this report.

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.