One hallmark of an intelligent animal is the development of multilevel societies, full of complex relationships. Humans, baboons, giraffes, elephants and even dolphins divide themselves into family units that are part of larger clans that may have ties or relationships to other groups. Keeping tabs on dozens—or even hundreds of social relationships—requires the firepower of big mammalian brains—or so scientists thought.

A new study published this week in the journal Current Biology about an East African bird species with a pretty small brain reveals that animals may not necessarily necessarily need to be smart to be social.

While ornithologist Damien Farine of the Max Planck Institute of Animal Behavior was completing his postdoctoral research, he actually didn’t study birds at all. Initially, he analyzed multilevel relationships among baboons in Kenya. It was then when he first noticed that the vulturine guineafowl wandering around his research site seemed to live in stable groups and exhibited some of the same social behaviors as the primates, reports Elizabeth Preston at the New York Times.

Later, Farine and his colleagues decided to study the gorgeous blue-feathered, turkey-like species in depth. They set up at the Mpala Research Center in Nanyuki, Kenya, where they watched 441 guineafowl, keeping track of their movements and associations for a year. They found that the local population was divided into 18 distinct social groups numbering between 18 and 65 birds each. They then attached GPS trackers to 58 of the birds, at least one in each group, which allowed them to map the movements of each group 24 hours a day.

The groups were remarkably stable, anchored by several breeding pairs. They also found that certain groups liked hanging out with one another, meeting up at certain times of the day and around certain features in the landscape. Some groups would also spend most of the day off on their own, then meet up with another pack of bird friends to roost at night. In other words, they exhibit the same type of multilevel society as big-brained mammals.

“To our knowledge, this is the first time a social structure like this has been described for birds,” says lead author Danai Papageorgiou, also of Max Planck Institute, in a statement. “It is remarkable to observe hundreds of birds coming out of a roost and splitting up perfectly into completely stable groups every single day. How do they do that? It’s obviously not just about being smart.”

In fact, Farine tells Preston that these particular birds aren’t particularly intelligent.

“They don’t only have small brains relative to mammals,” he says. “They also have quite small brains relative to other birds.”

The study raises the possibility that multilevel societies aren’t some sort of higher-level function. It’s possible that it’s a survival strategy for animals that live in groups. Farine tells Katie Hunt at CNN that because the guineafowl are large, relatively slow and colorful, they are easy prey. Living in a group gives the animals more eyes and ears to raise an alarm when danger lurks nearby.

One big question is how the birds can keep track of what appears to be hundreds of social relationships with such low computing power. It’s currently not clear how the birds do it, but anthropologist Larissa Swedell of Queens College tells Preston that living in a multilevel society might actually make keeping tabs on friends easier. She points out that in the baboons she studies each animal only needs to recognize one or two individuals in a group to know who’s who because the groups are so stable and stick together.

Now that smarts have been taken out of the equation, Farine tells the Times he expects that there are many other multilevel societies in nature that researchers have missed while chasing bigger brains.