The kids at Hogwarts were skeptical of paranoid professor Alastor ‘Mad-Eye’ Moody’s mantra of “constant vigilance.” The old nut and beloved Harry Potter character had experienced his share of threats, but that was because he’d once lived a dangerous life as an Auror. Surely, there was no reason the students needed to be as alert as their electric-eyed professor, right?

But Moody turned out to be right in more ways than one. The students not only needed to be prepared to encounter extreme danger, but their brains, according to a new study, are likely wired by evolution to be that way — just like other animals. In the paper published Thursday in the journal Cell, scientists from Stanford University suggested that the brain circuits that are engaged when an individual is in a state of vigilance are conserved across a surprisingly wide range of members of the animal kingdom — that might even include humans.

“Since we observed such similar results in fish and mice, we hypothesize that these same cell types have a similar role in humans,” lead author Matthew Lovett-Barron, Ph.D., tells Inverse.

While Lovett-Barron points out that we can’t say for sure — he says measurements in the human brain aren’t possible with existing technology — it makes sense that they would. Animals of all types have to be able to deal with threats (but only occasionally those of the Death Eater variety), and scientists have observed all of them in a vigilant state.

The well-characterized “flight-or-flight” response, which prepares the body either to do battle or run away, causes the heart to beat furiously in order to pump blood to muscles and speeds up breathing to bring more oxygen to the blood. Prior to the new study, it was thought that these behaviors were controlled by a single brain structure called the locus coeruleus, but the researchers showed that they’re controlled by much more complex patterns of brain activity.

And those patterns could be similar across brains on high alert throughout the animal kingdom.

Scared cat is really scared
The new research suggests that the brain activity pattern in a vigilant cat is similar to that in fish, mice, and even humans.

The researchers came to these conclusions after they scared a bunch of larval zebrafish — transparent fish that are popular lab animals — and waited for them to swish their tails, showing their alertness. At the same time, they used a technology called Multi-MAP (short for Multiplexed-alignment of Molecular and Activity Phenotypes) to look at every single neuron that was active in the fish brains while they were in that state. That in itself was a feat — it was the first time scientists have ever been able to track neuron activity and determine neuron type during any particular brain state with such high resolution.

“We looked at every neuron in the fish’s brain during life, when those cells were actively firing, and learned which cells were most active at moments when we knew that the fish was most alert,” said co-author Karl Deisseroth, Ph.D., in a statement.

Zebrafish blood vessels
The scientists knew the zebrafish were vigilant when they started swishing their tails.

Their analysis revealed six specific patterns of neuron activity linked to states of vigilance in the zebrafish. To investigate whether the same patterns were present in the brains of other vigilant animals, the researchers carried out similar experiments in mice and found equivalent patterns in their much more sophisticated brains, suggesting that the vigilance patterns are evolutionarily well-conserved. A follow-up study using an exciting new technique called optogenetics — which allows scientists to see exactly which neurons are ‘on’ and ‘off’ at any given time — confirmed the results in the mice.

“I was excited to see such similar activity in these cell types between these two species, which suggested to us that this pattern of neural activity was important enough to be conserved across the evolution of vertebrates,” Lovett-Barron says.

Since there’s quite a big evolutionary gap between zebrafish and mice, the researchers don’t think it would be too big a leap to say that vigilance looks the same in the human brain, too.

“This tight conservation of alertness-promoting circuits over such long epochs of evolutionary time — longer than human and mouse lineages have been separated — strongly implies relevance to humans as well,” said Deisseroth in his statement.

Not that healthy, actually.

Mad-Eye Moody wasn’t wrong to encourage his students to be vigilant, but there’s usually no need to be in that state all the time. In fact, being hyper-vigilant can be harmful. Scientists have linked hyper-vigilance with conditions such as anxiety, mania, and post-traumatic stress disorder, and part of the reason for the Stanford study was to find out what cells behave abnormally to lead to these states. Seeing how hyper-vigilance or hyper-arousal looks in the brain will be “an interesting avenue for future research,” says Lovett-Barron.

Now that they have a clearer picture of which cells are active in simpler animal models — and know that these patterns may hold throughout the evolutionary family tree — they’ll have a better chance at treating people whose constant vigilance impedes more than protects.

If you liked this article, check out this video on what smoking weed does to your brain.