Chances are that’s a shy elk looking back at a bold magpie, in the photograph above.

They get along, so to speak, because the elk needs grooming and the magpie is looking for dinner. But they may have never entered into this partnership if it weren’t for their particular personalities, suggests a study published Wednesday in Biology Letters.

Let’s start with the elk. In Canada’s western province of Alberta, they’ve been acting strange. Some have quit migrating, opting to hang around towns with humans who protect them from predators like wolves. Others still migrate.

As a doctoral student at the University of Alberta, Robert Found, now a wildlife biologist for Parks Canada, discovered over years of observing their personalities that bold elk stayed, while shy elk migrated. But he noticed something else in the process of completing his research: As elk laid down to rest at the end of the day, magpies approached.

There appeared to be a pattern: elk of some personality types aggressively rejected magpies. Others didn’t. “Sometimes the magpies will walk around right on the head and the face of the elk,” Dr. Found said.