A family in Steamboat Springs, Colorado spent a nerve-racking 45 minutes trapped in an upstairs room of their home when a large black bear entered the family’s residence looking for food. While the family remained locked in an upstairs bedroom, Colorado Parks & Wildlife (CPW) officers attempted to haze the bear from the home but were unsuccessful. The bear acted aggressively toward the responding officers, who “put [the bear] down for reasons of health and human safety,” according to a press release.

The bear came into the home through an open garage door on Tuesday, September 7. Neighbors told CPW District Wildlife Manager Adam Gerstenberger that the bear had been pillaging other garages in the neighborhood prior to the incident. Gerstenberger said an injury to the bear’s mouth had impacted its ability to gather food in the wild.

“The bear had a broken lower jaw that was split in the middle,” Gerstenberger said. “It had healed up wrong and one of its canines was hanging out from its upper lip. The other lower canine was shattered, so its teeth weren’t meeting up. The injury is likely the reason why the bear had turned to human food sources.”

In a separate incident, CPW officials euthanized another “dangerous” bear in Steamboat Springs on September 16. Human-bear conflict, which includes negative encounters between bears and humans, pets, livestock, and property, is on the rise this year, according to a recent Field & Stream investigation. The increase in conflict is fueled in part by the combination of exploding numbers of park visitors and increasing bear populations. While fatal attacks remain rare, conflict generally occurs when a bear is protecting its young or defending a food source.

Read Next: 2021 Has Been a Year of Brutal Bear Attacks—And the Worst May Be Yet to Come

During the fall, bears prepare for hibernation in what’s called hyperphagia. Bears spend up to 20 hours a day attempting to find and eat more than 20,000 calories of food to fatten up for the long winter ahead. Hyperphagia is an especially common time for bear activity to increase in urban and suburban areas.

Black bears possess a sense of smell that is 100-times more sensitive than that of humans. They can detect food from up to five miles away. Bears also have keen memories—once they find food, they’ll be back for more. CPW urges people to secure any food sources—including trashcans, pet feeders, bird feeders, barbeques, and fruit trees—around their homes that might attract bears. People should also lock windows and doors, including home, vehicle, and garage doors, that could be accessed by bears.