In the N-prisoners' dilemma (NPD), cooperation produces ingroup efficiency. But if ingroup gains from cooperation are less than outgroup losses, then macro-efficiency for the collectivity (defined as ingroup plus outgroup) is harmed. We call this situation a layered prisoners' dilemma (LPD). The LPD models diverse real world situations -from OPEC's effect on consumers to interest groups' effect on citizens.We developed an experimental analogue to test three hypotheses about LPD behavior. We found that subjects' behavior was not motivated by a concern for macro-efficiency but, instead, was a function of ingroup interaction. Specifically, ingroup discussion decreased macro-efficient behavior, but the amount of the decrease depended on decision-making structures and ingroup perceptions of outgroup worthiness. The results suggest that macro-inefficient behavior will be ubiquitous due to the ease with which subjects form ingroups. But the results also suggest tactics for constraining macro-inefficient behavior, though the success of the tactics depends on the existence of crosscutting group loyalities.