If you had the choice between hurting yourself or someone else in exchange for money, how altruistic do you think you’d be? In one infamous experiment, people were quite willing to deliver painful shocks to anonymous victims when asked by a scientist. But a new study that forced people into the dilemma of choosing between pain and profit finds that participants cared more about other people’s well-being than their own. It is hailed as the first hard evidence of altruism for the young field of behavioral economics.

Human behavior toward others is hard to predict. On the one hand, we stand out in the animal world for our altruism, often making significant sacrifices to help out a stranger in need. And all but the most antisocial people experience psychological distress at witnessing, let alone causing, pain in others. Yet study after study in the field of behavioral economics has demonstrated that we tend to value our own needs and desires above those of others. For example, researchers have found that just thinking about money makes people behave more selfishly.

To try to reconcile the angels and devils of our nature, a team led by Molly Crockett, a psychologist at the University of Oxford in the United Kingdom, combined the classic psychological and economics tools for probing altruism: pain and money. Everyone has their own pain threshold, so the first task was a pain calibration. Researchers administered electric shocks with electrodes attached to the wrists of 160 subjects, starting at an almost imperceptible level and amping up until the subject described the pain as intolerable. (For most people, that threshold for pain is similar to holding your wrist under a stream of 50°C water.)

Then the team drew pairs of subjects randomly and sat them down in front of a computer. Each person knew of the existence of the other but did not see him or her. One of the pair was randomly chosen to be the “decider” in a series of trials. The decision involved how many electrical shocks would be doled out, either to the decider or to the anonymous receiver. Both people knew that the shocks would be at a level that had been established during calibration as “mildly painful but not intolerable.”

Those zaps came with price tags. The total amount of money that could be gained in a trial varied from about $0.15 to $15, but there were always two deals to choose from. The decider might have to choose, for example, between doling out seven shocks for $10 versus doling out 10 shocks for $7. Or sometimes the shocks were cheaper in bulk: You could dole out seven shocks for $10 versus 10 shocks for $15. No matter who got the shocks—the computer told the decider who would get the shocks—the decider always got the money.

A computer algorithm adjusted the price ratios over the course of the trials to home in on the costs associated with people’s preferences. Those monetary values served as a proxy measure of how much people cared about harm to themselves versus harm to others. If the pessimistic view of human nature is true, people should be more averse to shocking themselves—and so be willing to make less money—as compared with shocking others.

But the opposite happened. The study’s participants did not like the pain of receiving a shock, because they were willing to make about $0.30 less money per shock on average to receive fewer of them. But people were willing to lose twice that amount, $0.60 per shock, to hurt an anonymous other less, the team reports online today in the Proceedings of the National Academy of Sciences.

The next step, Crockett says, is to do the experiments while scanning people's brains to "investigate how these [moral] computations go awry in disorders like psychopathy."

“This is a landmark study,” says Johannes Haushofer, a psychologist at Princeton University. The result is “both obvious and surprising.” Intuition dictates that people should be willing to give up some money to avoid the distress of hurting someone. But “despite decades of research, the effect had not previously been demonstrated,” he says. It may be possible to tap into this altruism simply by reminding people in positions of power—from chefs to politicians—of the painful consequences of their decision to cut corners.