Abstract. Fragmentation, deterioration, and loss of habitat patches threaten the survival of many insect species. Depending on their trophic level, species may be differently affected by these factors. However, studies investigating more than one trophic level on a landscape scale are still rare. In the present study we analyzed the effects of habitat size, isolation, and quality for the occurrence and population density of the endangered leaf beetle Cassida canaliculata Laich. (Coleoptera: Chrysomelidae) and its egg parasitoid, the hymenopteran wasp Foersterella reptans Nees (Hymenoptera: Tetracampidae). C. canaliculata is strictly monophagous on meadow sage (Salvia pratensis), while F. reptans can also parasitize other hosts. Both size and isolation of habitat patches strongly determined the occurrence of the beetle. However, population density increased to a much greater extent with increasing host plant density (= habitat quality) than with habitat size. The occurrence probability of the egg parasitoid increased with increasing population density of C. canaliculata. In conclusion, although maintaining large, well-connected patches with high host plant density is surely the major conservation goal for the specialized herbivore C. canaliculata, also small patches with high host plant densities can support viable populations and should thus be conserved. The less specialized parasitoid F. reptans is more likely to be found on patches with high beetle density, while patch size and isolation seem to be less important.