WASHINGTON (AP) - A few years ago, a Sydney scientist noticed a sulfur-crested cockatoo opening his trash bin. Not every resident would be thrilled, but ornithologist Richard Major was impressed by the ingenuity.

It's quite a feat for a bird to grasp a bin lid with its beak, pry it open, then shuffle far enough along the bin's edge that the lid falls backward - revealing edible trash treasures inside.

Intrigued, Major teamed up with researchers in Germany to study how many cockatoos learned this trick. In early 2018, they found from a survey of residents that birds in three Sydney suburbs had mastered the novel foraging technique. By the end of 2019, birds were lifting bins in 44 suburbs.

“From three suburbs to 44 in two years is a pretty rapid spread,” said Major, who is based at the Australian Museum.

The researchers' next question was whether the cockatoos had each figured out how to do this alone - or whether they copied the strategy from experienced birds. And their research published Thursday in the journal Science concluded the birds mostly learned by watching their peers.

“That spread wasn't just popping up randomly. It started in southern suburbs and radiated outwards,” said Major. Basically, it caught on like a hot dance move.

Scientists have documented other examples of social learning in birds. One classic case involves small birds called blue tits that learned to puncture foil lids of milk bottles in the United Kingdom starting in the 1920s - a crafty move, though less complex and physically demanding than opening trash bins.

But observing a new “cultural trend” spreading in the wild - or suburbs - in real time afforded the cockatoo researchers a special opportunity, said Lucy Aplin, a cognitive ecologist at Max Planck Institute of Animal Behavioral in Germany and co-author of the study. “This is a scientist's dream,” she said.

During summer of 2019, trash-collection day in suburban Sydney was the team's research day. As garbage trucks rolled down their routes and people shoved bins to the curb, Max Planck Institute behavioral ecologist Barbara Klump drove around and stopped to record cockatoos landing on bins. Not all cockatoos succeeded in opening them, but she took around 160 videos of victorious efforts.

Analyzing the footage, Klump realized the vast majority of birds opening bins were males, which tend to be larger than females. The birds that mastered the trick also tended to be dominant in social hierarchies.

“This suggests that if you're more socially connected, you have more opportunities to observe and acquire new behavior - and also to spread it,” she said.

Cockatoos are extremely gregarious birds that forage in small groups, roost in large ones, and are rarely seen alone in Sydney. While many animals have declined with the expansion of Australian cities, these bold and flamboyant birds generally have thrived.

“In an unpredictable, rapidly changing environment with unpredictable food sources, opportunistic animals thrive,” said Isabelle Laumer, a behavioral researcher at the University of California, Los Angeles, who was not involved in the research.

Over the past decade, research has shown that “urban adaptability is correlated with traits like innovativeness, behavioral flexibility and exploration,” said Max Planck Institute's Aplin. What the new research adds to that understanding is that critters that easily transmit knowledge and new skills socially also have an advantage.

Parrots - which include cockatoos - are known for being among the most clever birds. They have a brain just the size of a walnut, but the density of neurons packed into their forebrains gives many species cognitive abilities similar to great apes, said Irene Pepperberg, an animal cognition researcher at Harvard, who has studied African grey parrots and was not involved in the new paper.

While African grey parrots are known for their ability to mimic and sometimes comprehend human speech, cockatoos are famously adept at using and manipulating new tools, such as puzzle boxes in the lab or trash bin lids in the wild, she said.

“Everyone in Sydney has an opinion about cockatoos,” said the Australian Museum's Major. ”Whether you to love to watch these big flamboyant social birds, or think they're a pest, you have to respect them. They've adapted so brilliantly to living with humans, to human domination of the environment.”