We’ve all heard how rats will abandon a sinking ship. But will they attempt to save their companions in the process? A new study shows that rats will, indeed, rescue their distressed pals from the drink — even when they’re offered chocolate instead. They’re also more likely to help when they’ve had a dunking of their own, adding to evidence that the rodents feel empathy.

Previous studies have shown that rats will lend distressed companions a helping paw, says Peggy Mason, a neurobiologist at the University of Chicago who was not involved in the work.

In a 2011 study, for example, Mason and colleagues showed that if a rat is trapped in a narrow plastic tube, its unrestrained cagemate will work on the latch until it figures out how to spring the trap. Skeptics, however, have suggested that the rodents help because they crave companionship, not because their fellow rodents were suffering.

The study by researchers at the Kwansei Gakuin University in Japan, puts those doubts to rest, Mason says. For their test of altruistic behavior, the team devised an experimental box with two compartments divided by a transparent partition. On one side of the box, a rat was forced to swim in a pool of water, which it strongly disliked. Although not at risk of drowning — the animal could cling to a ledge — it did have to tread water for up to five minutes. The only way the rodent could escape its watery predicament was if a second rat — sitting safe on a platform — pushed open a small round door separating the two sides, letting the first rodent climb onto dry land.

Within a few days, the high-and-dry rats were regularly aiding their soaking companions by opening the door, the team reported in the journal Animal Cognition. They did not open the door when the pool was dry, confirming that the rats were responding to others’ distress rather than because they wanted company, Mason says.

Rats that had once been immersed learned how to save others much more quickly than those that had never been soaked, suggesting that empathy drove their behavior, she adds. “Not only does the rat recognize distress, but he is even more moved to act because he remembers being in that situation.”

Next, the team put the rodents to the ultimate test, pitting chocolate against altruism. In this experiment, rats on the dry platform had to choose between two doors, one that allowed their soaked companion to escape from the pool and another that provided access to a tasty chocolate treat. The rodents chose to help their companions before seeking the snack 50 to 80 percent of the time, showing that the urge to help a fellow rat was at least as strong as the desire for food, the authors say.

People differ from rats in many ways, but the study supports a growing body of evidence that there’s an evolutionary basis for helpful behavior, independent of culture or upbringing, Mason says. “Humans are not helping purely because Mom taught us to help,” she says.

“In part — and to what degree remains to be seen — we help because it’s in our biology.”

Science, the journal of the AAAS