Task displays, timing and design. In the first scanning session, each trial began by informing the participant that the program has randomly chosen one out of the three confederates as his/her partner in the current trial, the identity of whom was unknown. The participant and his/her partner had to quickly estimate the number of dots on the screen. The participant was told to press a corresponding button, using the left or right thumb, to indicate whether his/her estimation was larger or smaller than the number (randomly chosen from 19, 20 and 21) appeared on the next screen. There were always 20 dots on the screen, the positions of which were randomly generated. The positions of ‘Smaller’ and ‘Larger’ were counterbalanced across participants. The correctness of their estimations was presented under the photo of the participant and under a blurred picture of face representing the partner. Before and after the outcome presentation, a fixation cross (not shown in the figure) was presented for a variable of interval ranging from 1 to 3 s. These are for the purpose of fMRI signal deconvolution. The participant indicated the level of pain he/she would be willing to take by pressing 1 of 4 corresponding buttons ranging from 0 (‘no pain’) to 3 (‘moderate pain’), using his/her left or right thumb. The participant was told that the more pain he/she took, the less his/her partner had to suffer. Finally, a pain stimulation of the participant’s choice was delivered to him/her.