On the basis of prior research, group failure on a task was expected to adversely affect cooperative responses to a subsequent social dilemma. However, from social identity theory, it was predicted that this effect would be moderated by strength of group identity. I experimentally manipulated the extent to which participants (48 four-person groups) developed a relatively strong or weak group identity and succeeded or failed on an intellective task. As hypothesized, a strong group identity mitigated the adverse consequences of collective failure. Mediation analyses determined that the effects of group identity were a function of two independent processes: normative expectations of cooperation by others and increased concern for the group's welfare relative to purely selfish concerns.