Despite the robustness of self-serving and group-serving biases in attribution, there has been only limited evidence for these effects in counterfactual thinking. The present studies demonstrate that, following a negative outcome, individuals counterfactualize external factors relatively more than internal factors when they are identified with the target (i.e. ingroup members or the self) than when they are not. However, these effects are found only for external factors that are in some way disadvantageous to the target and could have led to the negative outcome. Implications of these findings for understanding the relationship between counterfactual thinking and judgments of causality, blame and affect are discussed. Copyright © 2007 John Wiley & Sons, Ltd.