Repeated interactions provide an evolutionary explanation for one-shot human cooperation that is counterintuitive but orthodox1,2,3. Intergroup competition4,5,6,7Â provides an explanation that is intuitive but heterodox. Here, using models and a behavioural experiment, we show that neither mechanism reliably supports cooperation. Ambiguous reciprocity, a class of strategies that is generally ignored in models of reciprocal altruism, undermines cooperation under repeated interactions. This finding challenges repeated interactions as an evolutionary explanation for cooperation in general, which further challenges the claim that repeated interactions in the past can explain one-shot cooperation in the present. Intergroup competitions also do not reliably support cooperation because groups quickly become extremely similar, which limits scope for group selection. Moreover, even if groups vary, group competitions may generate little group selection for multiple reasons. Cooperative groups, for example, may tend to compete against each other8. Whereas repeated interactions and group competitions do not support cooperation by themselves, combining them triggers powerful synergies because group competitions constrain the corrosive effect of ambiguous reciprocity. Evolved strategies often consist of cooperative reciprocity with ingroup partners and uncooperative reciprocity with outgroup partners. Results from a behavioural experiment in Papua New Guinea fit exactly this pattern. They thus suggest neither an evolutionary history of repeated interactions without group competition nor a history of group competition without repeated interactions. Instead, our results suggest social motives that evolved under the joint influence of both mechanisms.