Caterpillars that are attacked by some species of parasitoid wasps are known to survive for several days after the parasitoid larvae emerge and pupate. It has been argued that the behaviour of the parasitized larva is ‘usurped’ by the parasitoid and that it ‘guards’ the parasitoid cocoons against their own natural enemies such as hyperparasitoids (the ‘usurpation hypothesis'). We tested this hypothesis in the association involving a gregarious endoparasitoid, the wasp Cotesia glomerata; caterpillars of its host, the large cabbage white butterfly Pieris brassicae; and a pupal hyperparasitoid, the wasp Lysibia nana. In laboratory experiments, we presented cocoon broods of C. glomerata to single females of L. nana in arenas for 6 h. We tested several treatments for rates of primary parasitoid survival, including variation in the position of the caterpillar and the presence or absence of an additional silk web spun by parasitized caterpillars. Parasitized P. brassicae larvae survived longer than the period necessary for C. glomerata adults to emerge. Rates of parasitoid survival were, however, unaffected by the presence of a P. brassicae larva on the cocoon brood, although significantly more parasitoids emerged when the silk web was present. Analyses of the foraging behaviour of individual L. nana females in arenas, performed using Observer software, revealed that the wasps showed a greater tendency to leave cocoons when caterpillars and silk were present. The laboratory experiments only partially support the usurpation hypothesis. In nature, usurpation of the host of the primary parasitoid may be a more effective strategy against generalist predators than against more specialized and better-adapted hyperparasitoids.