Japanese (N = 48) and New Zealander (N = 55) participants were first assigned to one of two minimal groups, and then played a prisoner's dilemma game twice with an ingroup member and twice with an outgroup member. In one of the two games they played with an ingroup (or outgroup) member, participants and their partner knew one another's group memberships (mutual-knowledge condition). In the unilateral-knowledge condition, only the participants knew the group membership of their partner, but the partner did not know the group membership of the participant. Ingroup bias in cooperation emerged only in the mutual-knowledge condition in both countries; in the unilateral-knowledge condition no ingroup bias emerged. Mediational analyses found that, in accord with predictions, cooperation in the mutual-knowledge condition is mediated by expectation of the partner's cooperation. Ingroup bias in the mutual-knowledge condition emerged only among those who identified with the ingroup. Results provide support for a group heuristics account of ingroup favouritism in the minimal group. According to this account, participants who face minimal groups activate an ecologically adaptive heuristic of unilaterally cooperating with members of the same group, expecting indirect repayment from others in the same group.