This article experimentally explores how the enforcement of cooperative behaviour in a social dilemma is facilitated through institutional as well as emotional mechanisms. Recent studies emphasise the importance of anger and its role in motivating individuals to punish free riders. However, we find that anger also triggers retaliatory behaviour by the punished individuals. This makes the enforcement of a cooperative norm more costly. We show that in addition to anger, ‘social’ emotions like guilt need to be present for punishment to be an effective deterrent of uncooperative actions. They play a key role by subduing the desire of punished individuals to retaliate and by motivating them to behave more cooperatively in the future.