Mesencephalic dopamine neurons are believed to facilitate reward-dependent learning by computing errors in reward predictions. We used fMRI to test whether this system was activated as expected in response to errors in predictions about whether a social partner would reciprocate an act of altruism. Nineteen subjects received fMRI scans as they played a series of single-shot Prisoner's Dilemma games with partners who were outside the scanner. In both ventromedial prefrontal cortex and ventral striatum, reciprocated and unreciprocated cooperation were associated with positive and negative BOLD responses, respectively. Our results are consistent with the hypothesis that mesencephalic dopamine projection sites carry information about errors in reward prediction that allow us to learn who can and cannot be trusted to reciprocate favors.