In 2015, a woman named Barbara Paschke was attacked and killed by a black bear inside her home in northwest Montana. Paschke, who was 85 and suffered from Alzheimer’s, had been feeding bears regularly on her property, a practice that is illegal and, as her death showed, potentially fatal. Bears can quickly get used to foraging for easily accessible food sources close to human habitation, but they remain wild animals, imperiling both humans and themselves.

Nobody knows this reality better than the farmers, ranchers, and other humans living in areas with high bear populations. Unlike Barbara Paschke, most have no desire to feed the bears, but they often end up doing it unwittingly. “Nuisance bears,” as chronic offenders are described by wildlife biologists, invade trash cans, sniff out pet food, break into stores of livestock feed, feast on dead livestock, and occasionally wander into town to make photo-worthy pests of themselves. Last summer the local paper where I live in Montana featured a picture of a grizzly sitting complacently on a branch near the crown of someone’s backyard cherry tree. Once accustomed to getting their food near human settlements, bears can cause significant property damage, not to mention the risks to people living nearby.

And once bears start engaging in nuisance activities, they might be passing those habits along to their cubs, perpetuating not only the behaviors, but also resentment from local landowners toward large predators. This question of the link between parent and offspring behavior is what led Andrea Morehouse, an independent wildlife ecologist, to design a study focused on the possibility that bears learn, rather than inherit, their problem behaviors from a parent. She got the idea from a rancher at a local meeting, who asked if cubs learned problem behaviors from their mothers.

The study, which Morehouse conducted in partnership with biologists for the U.S. Geological Survey (USGS) and which was recently published in PLOS ONE, bore out the rancher’s idea. It demonstrates a “consistent and clear pattern,” Morehouse says, between bears who engage in nuisance behavior, and whether or not their mothers were problem bears. Rather than adults opportunistically learning to forage for food on farms or in national park campgrounds, a bear’s habits are most likely developed during the two to three years he spends at his mother’s knee, long after the father has abandoned his mate.

Morehouse and her colleagues painstakingly searched out hairs left on power poles, fence posts, barbed-wire fencing, and trees that bears had “rubbed” (known as “rub trees”). To keep the samples consistent, the hairs from rub objects were collected from flagged wires attached to the objects themselves, rather than from tree bark or fence posts.

The process, says Tabitha Graves, a wildlife biologist with the USGS and a co-author on the paper, involves the simple act of walking through the woods and looking for signs of these “rub trees” or “rub objects”: scratched bark, which releases pitch, or ground on which a bear has stomped and twisted its feet (which would leave quite a mark—grizzlies average around 200 to 500 pounds, depending on sex, although males in coastal areas with access to higher-fat foods like salmon can reach above 850 pounds). The researchers also followed clear game trails that ran across fence lines or through berry patches. Sometimes they found a big chunk of hair, but sometimes all the the bear left was a solitary strand.

The researchers took the samples back to Wildlife Genetics International in British Columbia for DNA testing, using a computer program called COLONY to match up parent-offspring pairs. They then combined the bears’ genetic information with incident reports throughout Bear Management zones in southwestern Alberta. Whittling down the results led to eight mother-offspring pairs where the mother had a history of conflict and 27 father-offspring pairs where the father had a history of conflict. They then narrowed the results down to the pairs in which both the offspring and the parent had a history of problem behaviors.

The researchers found that the problem bears in the study tended to have problem mothers—that is, both were bears that were prone to nuisance behaviors like raiding livestock feed, rooting in human trash for food, or, say, climbing someone’s cherry tree. Although there were a larger number of fathers involved in incidents, it was with problem mothers that bears were likely to be problem bears themselves.

In other words, the bears’ behavior isn’t genetic; it’s learned. “The pattern” of the high proportion of problem offspring having problem mothers, Morehouse reiterates, “is very clear.” Which means that, by intervening with mothers that engage in problem behavior, landowners and wildlife managers can perhaps prevent further generations of grizzlies from learning to do the same.

The key to this prevention is the human element. While previous efforts have often focused on what’s called “aversive conditioning,” which uses “pain, discomfort, or irritation” to steer bears away from human habitation and livestock, previous studies have found that this kind of practice isn’t effective if bear-accessible food remains in the area. Bears are “opportunistic and flexible foragers.” Not only that, but female grizzlies need a minimum of 20 percent body fat to reproduce. Getting an adequate amount of calories into those huge bodies is crucial. If grizzlies learn that food is easy to come by, whether people are feeding them or just leaving their trash cans out by the road, they will keep returning for your livestock grain, your garbage, your backyard chickens, and your fruit trees, averse conditioning be damned.

“Wildlife management” is a term that doesn’t always get a lot of attention, much less respect, but work such as that done by Morehouse, Graves, and their colleagues is key to helping us live alongside large predators like grizzlies. Teaching humans to behave more thoughtfully around wildlife is turning out to be crucial to the bears’ survival, especially in areas where one might find hostility towards grizzlies due to previous problems.

There are already organizations in places like Montana and Alberta that teach people how to reduce bear conflicts, from keeping fallen apples picked up to storing cattle feed in bear-proof containers. Local organizations like Waterton Biosphere Reserve in Alberta help landowners install electric fencing, retrofit grain bins to be bear-proof, and remove dead livestock so as not to attract bears. In fact, as Morehouse pointed out more than once, it was the landowners’ desire in southwestern Alberta to work with their bear problem that led to this study in the first place. Morehouse describes the community she works in, which is a “hot spot” for grizzly interactions, as extremely proactive and focused on local collaboration.

In Montana, organizations from Montana Fish, Wildlife & Parks to the Confederated Salish-Kootenai Tribes, among others, employ people to teach residents about living in bear country, and Defenders of Wildlife has a multi-state program to reduce the cost of electric fencing around garbage, fruit trees, and livestock. Waterton Biosphere Reserve itself is modeled on Blackfoot Challenge, which has been working on wildlife issues with landowners in and around Montana’s Blackfoot Valley, on the east side of Glacier National Park, since 2001. Blackfoot Challenge boasts a 93 percent reduction in incidents with grizzly bears since it began installing electric fencing, removing carcasses, and deploying Range Riders around affected properties. They’ve since expanded their strategies to wolves.

As climate change begins to adversely affect some of grizzlies’ main wild food sources, like huckleberries, serviceberries, and whitebark pine nuts, learning to behave better around bears will become essential both for their survival and our safety. It’s worth noting that the year Barbara Paschke was killed, the area where she lived in northwest Montana had suffered drought conditions, leading to decreased wild berry crops and a huge uptick in black and grizzly bear sightings and incidents throughout the region.

Grizzlies aren’t territorial, as wolves are, but their habitat range is huge. Male grizzlies in the area of Alberta where Morehouse’s study was conducted wander across an average of 230 to over 300 square miles per bear, and females use about 80 to 155 square miles. Grizzly bears need space to roam and breed and eat, a lot of it, and space is a vanishing resource for bears and humans alike: Worldwide, grizzlies have lost about 50 percent of their historic range since the mid-1800s, and 98 percent in the lower 48 U.S. states.

With all those factors weighted against them, the greatest threat to grizzly bears is conflicts with humans themselves. While the grizzly bear that ended up atop the cherry tree in my town was eventually relocated to near the Canadian border, many others are killed in self-defense, through poaching, from getting hit by a car, from mistaken identity—as when a hunter with a license to shoot a black bear ends up shooting a grizzly instead—or due to their “nuisance” status.

Knowing more than we once did about human impacts on ecosystems, and having the tools to change our own habits, it’s time for us to take responsibility for adapting to our habitats, rather than the other way around. A few less bears to end up perched atop our cherry trees, and, one hopes, no more tragic stories like Barbara Paschke’s—who, by all accounts, was motivated to feed the bears only by a desire to love and care for the wildlife she lived among.