A sign warns of bear activity after a bear fatally attacked a woman in West Yellowstone, Montana, in July.
CNN  — 

An adult grizzly bear with “a history of conflict” was euthanized Saturday after breaking into a home through a kitchen window while with a cub and taking a container of dog food, Montana Fish, Wildlife & Parks said in a news release.

With permission from the US Fish & Wildlife Service, Montana Fish and Wildlife staff shot the adult grizzly “due to an immediate public safety threat from the bear’s food-conditioned behavior,” the release said.

The 46-pound male cub who was near the adult grizzly was captured and is being held in Helena at the agency’s wildlife rehabilitation center. In the next few weeks, the cub will be transferred to a zoo.

Through genetic analysis and other identifying characteristics, the adult grizzly bear was found to be the same bear involved in a fatal attack of a woman in July near West Yellowstone, the agency said in a news release.

In 2020, the same bear was also involved in an encounter that injured a person near Henrys Lake State Park in Idaho, the release said.

After careful evaluation, both incidents were determined to be “defensive responses” by the bear, the agency said.

“Multiple efforts to trap and remove the bear were made after the fatal attack in July due to the incident’s proximity to residences, campgrounds, and high-use OHV (off-highway vehicle) trails. These efforts were unsuccessful,” the release said.

Grizzly bears are protected as a threatened species in the contiguous 48 states. They rarely show predatory behavior toward humans, according to the Interagency Grizzly Bear Committee, which has representatives from federal wildlife and forest management agencies, along with state wildlife agencies in Idaho, Montana, Washington and Wyoming.

“The 10-year-old female grizzly had originally been captured in 2017 for research purposes,” Montana Fish, Wildlife & Parks said.

“Montana is bear country” and this time of year “is when bears are active for longer periods as they consume more food in preparation for hibernation. This period overlaps with hunting season and other fall recreation activities,” the agency noted.

The agency listed several ways to stay safe in areas that might include bears, such as:

• Carry bear spray and be prepared to use it immediately.

• Travel in groups and make noise to alert bears of your presence.

• Stay away from animal carcasses, which often attract bears.

• Keep garbage, bird feeders, pet food and other attractions stored in a secure building.

• Never feed wildlife. Bears that get conditioned to receiving food lose their natural foraging behavior and pose threats to human safety. (It’s illegal to feed bears in Montana.)

CNN’s Holly Yan contributed to this report.