Species diversity and potential impact of cocoon parasitoids on the abundance of the common pine sawfly, Diprion pini L. (Hymenoptera: Diprionidae), were explored in different forest habitats, with endemic sawfly populations, by the regular exposure of laboratory reared sawfly cocoons. Different cocoon spinning sites of the sawfly were simulated by exposing cocoons at several strata (soil, litter, trunk and stem of pine trees) in a forest. In more fertile, mixed spruce/pine-forests, parasitism on exposed cocoons was lower than in typical outbreak stands with a lower vegetational diversity. The parasitoid communities comprised of up to nine parasitoid species, which showed temporal and spatial niche separation. The ichneumonid Pleolophus basizonus Grav. (Hymenoptera: Phygadeuontinae) occured throughout the season at all strata as well as in all forest types. The ichneumonid Gelis cursitans F. (Hymenoptera: Phygadeuontinae) was only found in pine forests with sparsely developed ground vegetation, parasitizing exposed cocoons in the upper story in spring. The torymids Monodontomerus dentipes Dalm. (Hymenoptera: Torymidae) and M. minor Ratz. (Hymenoptera: Torymidae) were present in all forest types, but parasitized commonly only cocoons in the upper story in summer. Apparently, these generalists can quickly respond to increased densities of upper story exposed "summer" cocoons and thus limit the population growth of the pine sawfly due to the development of a second generation.