On a quiet evening in Laramie, Wyoming, what looks like a lone file cabinet sits near an abandoned barn. As the sun dips below the horizon, a commotion begins. Soon, there are paws scratching and teeth gnashing against aluminum and wood as fuzzy butts bump each other out of the way.

Like desperate high school freshmen who’ve forgotten their locker codes, raccoons jostle and fiddle with various locks guarding cubbies full of delicious dog food and sardine treats. Other raccoons wait in the background, ready to pounce on any unattended scraps. A skunk wandering into the ruckus gets shoved aside by the masked bandits.

This adorable anecdote was part of a research project detailed in July in Proceedings of the Royal Society B: Biological Sciences and one of several recent examples of our changing understanding of raccoon intelligence. While many other species around the world are in decline, raccoons are actually thriving, and do particularly well in urban areas, says lead author Lauren Stanton, a cognitive ecologist at the University of California, Berkeley. A large part of their success is due to their adaptability to new challenges and opportunities, whether that’s nesting in cozy chimneys, invading chicken coops, or breaking into trash bins—something that’s earned them the nickname “trash pandas.”

Raccoons are strong—they can push a cinder block off a trash can—and tenacious. The more we do to keep them out, the more skills they learn for breaking in, leading to a cognitive arms race between people and raccoons.

In 2016, for example, the city of Toronto spent 31 million CAD (that’s about $23 million) on raccoon-resistant waste bins. While they deterred most would-be robbers, certain tricksters had no problem solving the new puzzle. The city has continued to release new versions of the bin, trying to outsmart Toronto’s most persistent trash invaders.

“I imagined meetings led by genius raccoons like ours who had successfully broken into green bins and now enjoyed prestige in the raccoon community,” wrote personal garbage-theft victim and reporter Amy Dempsey in a 6,000-word investigation in the Toronto Star in 2018.

As far as we know, raccoons aren’t teaching each other their tricks, says Stanton. But wild raccoons’ unique abilities have long made them great problem-solvers, as well as mischievous rabble-rousers on the outskirts of human communities. Native to a large swath of North America, from southern Canada to the edge of South America, raccoons were a familiar sight to Indigenous people in the pre-Colonial era. The word raccoon can be traced back to the Proto-Algonquian word ärähkun, deriving from the phrase “he scratches with his hands.” Early taxonomists named them for a related, notable behavior: Ursus lotor translates as “washer bear,” and around the world, the local word for raccoon often includes some mention of washing. It’s based on the adorable—but not totally accurate—idea that raccoons wash their food before eating. While they do love giving their food a good dunk, it’s not really about cleanliness. Because raccoons appear to have evolved along rivers and other bodies of water, they have adaptations to find and dine on clams and other underwater treasures: Their paws are supersensitive when submerged.

Raccoons' dextrous paws evolved to be  extra sensitive underwater, allowing them to find crabs, clams, and other snacks.
Raccoons’ dextrous paws evolved to be extra sensitive underwater, allowing them to find crabs, clams, and other snacks. Gary Seloff/ Getty Images

“Touch is a very important sense to raccoons, and it’s actually stronger than some of their other senses,” says Stanton. “Raccoons are always feeling their environments.”

In the early 20th century, raccoons’ curiosity and dexterity caught the attention of psychology researchers, who noticed their behavioral similarities to monkeys. They hoped studying them in the lab might provide insight into human psychology. Alas, raccoons’ mischievous nature made them unruly participants. “They proved to be a handful,” says Stanton. “They were always breaking out of the cages, and were pretty obstinate and difficult to work with. So researchers threw in the towel with raccoons.”

While it’s hard to compare intelligence across species, says Stanton, she says that some recent studies show the neural density of raccoons is “more similar to primates than other carnivore species.” The raccoon brain is about the same size as a domestic cat’s brain, for example, but it contains roughly the same number of neurons as the larger brain of a dog.

“I tend to try not to think, ‘Oh, are they as smart as primates?’” says Stanton. “It’s tricky. Every animal has evolved to adapt to the environment that they have been ancestrally exposed to.”

Wherever they rank on the smart scale, raccoons have a knack for getting what they want. According to Stanton’s work, it seems their unique personalities make some better bandits than others.

As part of the research detailed in the recent paper, Stanton and her team presented raccoons with a rectangular wooden box—the “file cabinet”—that had 24 treat cubbies, each secured with a lock. To open the door and access the delicious treat inside each cubby, all a raccoon had to do was slide an aluminum latch to the right. Early in the study, it took a female raccoon named Willowherb several minutes and multiple tries to open the lock. When tested again a year later, she got it on her first try, suggesting she likely remembered the skill.

Eight out of 35 raccoons were eventually able to open the lock. They all had highly exploratory and persistent personalities, and succeeded through lots of trial and error. Curious youngsters were particularly good at the challenge. The lock-breakers also opened additional doors after figuring out the first, indicating they were applying what they learned.

In Stanton's recent study, raccoons learned how to open this sliding lock to get a tasty treat, before being presented with a variety of tricky latches.
In Stanton’s recent study, raccoons learned how to open this sliding lock to get a tasty treat, before being presented with a variety of tricky latches. Courtesy Lauren Stanton

The other raccoons didn’t go hungry: They chose to lurk in the shadows and steal food once the door was open. “We saw the emergence of this alternative strategy that works just as well,” Stanton says. “‘Why am I gonna work harder for this reward if I know somebody else is willing to do the hard work for me?’”

Next, the researchers replaced some of the locks with versions that were either easier or more difficult to open, requiring the raccoons to either slide, remove, swivel, or pull down a latch. They found that the same raccoons who were good solvers on the first test did well on the next, applying what they learned to more advanced latches. Even the raccoons that had resorted to stealing food in the previous test tried opening the easier locks, which eventually led them to figure out some of the harder ones. “They learned this basic skill, and then it gave them the motivation and knowledge to understand, ‘Oh, I can open these other things,’” says Stanton.

Unfortunately, the same process is true for trash cans. The more we try to keep raccoons out, the better some will get at breaking in.

Raccoons that are particularly curious and persistent tend to be the best bandits.
Raccoons that are particularly curious and persistent tend to be the best bandits. AdrianaPphotos/ GettyImages

In 2023, University of British Columbia doctoral student Hannah Griebling investigated a raccoon rumor on the Vancouver campus that speaks to human notions about raccoon intelligence: The adaptable animals were being blamed for nabbing DoorDash meals, allegedly lying in wait for the meals to arrive. Griebling and an undergraduate decided to test the theory. They found the raccoons were guilty of enjoying a late-night snack as much as any of us, but that they were not preplanning a purloined pizza party. While they did steal deliveries, they did so randomly, whenever they came across an unattended bag of food. For now, you can rest easy knowing raccoons probably aren’t plotting against you—yet.

However, we have learned that raccoons, once thought to be solitary, are in cahoots with each other far more than we knew. Urban raccoons in particular are unexpectedly social, and are often spotted in non-kin pairs or groups, says Griebling. In the DoorDash study, raccoons were far more likely to break into a bag if other raccoons were gathering. One of Griebling’s colleagues is currently exploring whether raccoons may be learning to work together, even egging each other on, or if the mere presence of a raccoon attracts others hoping to find a meal.

Thanks to their perseverance and problem-solving, raccoons have found their way into our garbage and our homes. They’ve also made their way into many hearts. But despite raccoons’ cute, meme-able faces, people aren’t usually stoked when a family of masked bandits establishes a latrine—essentially a trash panda toilet—in their garage, or leaves trash across their lawn. If that describes your situation, don’t despair, say the experts.

Urban raccoons are proving to be more social than researchers previously thought, often hanging out in groups of two or more.
Urban raccoons are proving to be more social than researchers previously thought, often hanging out in groups of two or more. Raimund Linke/ Getty Images

Despite their cunning nature, raccoons still have limitations, such as their lack of opposable thumbs. Stanton recommends “two- or three-step locks where you have to hold down but also rotate and pull at the same time.”

She adds: “I think things like that are going to be very difficult for raccoons, but I don’t think it’s out of the realm of possibility that they could get there with enough practice and motivation.”

That’s why the best strategy is to remove or entirely block access to that motivation, from trash bins to cozy attics to a coop full of tasty chickens, says Jake Sandler, who handles wildlife conflict mitigation at Think Wild Wildlife Hospital in Oregon. “Oftentimes the humane solution is actually a lot more effective than traditional pest control, like trapping or extermination,” he says. He likes to look for the root of the issue—why the animal is coming around—and then “find a way to get the animal out of the building, but not relocate them, and seal off whatever entry point they’re using.”

While raccoons may love our trash and attics, it's best for them to remain wild, even if it's in our own backyards.
While raccoons may love our trash and attics, it’s best for them to remain wild, even if it’s in our own backyards. Sean Russell/ Getty Images

For a more basic deterrent that you’ve probably already got in your pantry, consider tinfoil. Raccoons hate it for sensory reasons, so simply laying some down in their favorite spots can do the trick. Strong scents like that of hot sauce, cinnamon, or vinegar are also known to turn away a curious raccoon.

Perhaps most importantly, we can approach our trash-hungry counterparts with a bit more understanding—after all, they were here first. Maybe we can even learn something from them.

“I always try to keep the lessons of the raccoon in mind,” says Griebling. “They’re coping with all these changes in the environment that are happening really quickly, [without] warning.” When she comes across a challenge, she gives herself a pep talk, remembering to be adaptive and curious. “If the raccoons can do this,” she says, “I can do this.”