Saproxylic insects depend on dead or dying woody material at some stage of their life cycle (Speight 1989; Calix et al. 2010), and they account for approximately one third of all forest insect species (Stokland et al. 2012; Ulyshen and Šobotník 2018). They depend on deadwood either directly, by consuming woody parts, bark, and phloem; or indirectly, i.e., they feed on other saproxylic organisms (wood-rotting fungi or other saproxylic invertebrates) or they require deadwood for nesting. Saproxylic organisms contribute to decomposition as secondary wood decomposers and they thus help facilitate the process of nutrient recycling in woodland ecosystems.

Members of several insect orders are saproxylic, the three most diverse of which are beetles (Coleoptera), flies (Diptera), and bees and wasps (Hymenoptera). Moreover, saproxylic species can be found in other insect groups, such as snakeflies (Raphidioptera), true bugs (Heteroptera), and moths (Lepidoptera). Beetles are considered to be the most diverse group of saproxylic insects. Around 25% of all beetle species in Europe are obligatorily or facultatively saproxylic (Bouget et al. 2014; Seibold et al. 2015). While the numbers of saproxylic species of Diptera and Hymenoptera have yet to be quantified, their species richness might well be as high, or even higher, than that of beetles (Stokland et al. 2012). Nevertheless, beetles, due to their well-known taxonomy and relatively easy identification, are by far the most studied group of saproxylic insects. Conclusions about the relationships between habitat characteristics and the biology or diversity of saproxylic insects are therefore mostly based on beetles (Bouget et al. 2014; Horak et al. 2014; Müller et al. 2015; Miklín et al. 2017; Gimmel and Ferro 2018; Hilmers et al. 2018), while other insect groups are less represented in the literature (Fayt et al. 2006; Ricarte et al. 2007; Quinto et al. 2012; Ramírez-Hernández et al. 2014; Hilszczański 2018). This could lead to potential problems in biodiversity assessments of forest habitats and in conservation management policy if the patterns in saproxylic beetle diversity are not comparable with the requirements of other saproxylic groups (Müller et al. 2020).

Saproxylic Hymenoptera are represented mostly by the parasitoid families Braconidae and Ichneumonidae, the wood-boring sawfly families Xiphydriidae and Siricidae, wood dwelling ants (Formicidae), and secondary cavity dwelling aculeate families (Chrysididae, Vespidae, Pompilidae, Sapygidae, Crabronidae, Megachilidae, Apidae, and others). Aculeate Hymenoptera are among the most effective pollinators, and their habitat requirements and biodiversity have been well studied, especially in the context of open habitats and anthropogenic landscape changes (Ulrich 1999; Quintero et al. 2010; Williams et al. 2010; Heneberg et al. 2017). Pollinators have been facing the same, if not greater, biodiversity loss as other insect groups, mostly due to agricultural intensification, traditional management abandonment, and habitat loss (Biesmeijer et al. 2006; Grundel et al. 2010; Quintero et al. 2010; Schüepp et al. 2011; Vanbergen et al. 2013; Roberts et al. 2017). Aculeate Hymenoptera also include many species of predators (wasps) and parasitic species which fulfil valuable ecosystem services like pest control (Picanço et al. 2011; Ebeling et al. 2012; Prezoto et al. 2019; Brock et al. 2021).

Despite growing recognition that forests provide important habitats for saproxylic bees and wasps (Bogusch and Horák 2018; Falk 2021) and that the group is sensitive to management decisions (Westrich 1996; Westerfelt et al. 2015; Hanula et al. 2016; Lettow et al. 2018), few specific guidelines have been developed for supporting their diversity in forests (Potts et al. 2010; Bogusch and Horák 2018). At the same time, saproxylic bees and wasps differ from saproxylic beetles in their biology and ecology. Development time in saproxylic beetles takes about 2 years on average (with smaller species developing in 1 year, but very large species up to 4 or 5 years), whereas aculeate Hymenoptera have short generation time: the development from egg to adult usually takes no longer than 1 year, with some species having several generations per year. Therefore, aculeate Hymenoptera diversity and abundance reflects ongoing real-time habitat development. Hymenoptera also predominantly feed on nectar as adults, some require it for offspring (bees), and therefore their diversity depends on the existence of feeding patches which must be found within optimal foraging distance from their nesting site (Westrich 1996; Gathmann and Tscharntke 2002; Greenleaf et al. 2007; Grundel et al. 2010; Bennett et al. 2014). The nesting site, however, does not need to be rich in such resources, and many species are able to nest in shady habitats (Potts et al. 2005; Fabian et al. 2013; Taki et al. 2013). For instance, about 20% of European species of aculeate Hymenoptera nest in various cavities, beetle galleries, hollow branches, or naturally occurring cavities in deadwood. Such wood cavities can be expected to occur where most deadwood occurs, i.e., in forests, rather than outside them in open habitats. Therefore, although in general deadwood-dependent cavity-nesting Hymenoptera may prefer open habitats with available food resources for foraging, they may, in contrast, predominantly search for nesting sites in shady environments under the tree canopy due to higher incidence of deadwood substrates there or due to specific microclimate conditions.

Untargeted sampling methods may also add to the lack of clarity about requirements of saproxylic Hymenoptera in this context. The most commonly-used coloured pan traps sample foraging individuals and may be effective in sampling only part of the species pool (Leong and Thorp 1999; Heneberg and Bogusch 2014) or those affected by local flower availability (Heneberg and Bogusch 2014; Acharya et al. 2021; Westerberg et al. 2021). Alternatively used passive window-flight interception traps (Sebek et al. 2016; Perlík et al. 2023) can catch individuals that are only passing through the habitat but not using it for nesting. Even studies focusing on cavity-nesting bees and wasps rarely target saproxylic species specifically. Instead, they focus on all cavity-nesting species, thus including also the majority of those that utilise other substrates than wood for nesting, e.g. stems of herbs, straw, etc. (Tscharntke et al. 1998; Tylianakis et al. 2006; Bogusch and Horák 2018). Moreover, studies on cavity-nesting Hymenoptera are often carried out either in forest habitats only or in anthropogenic environments such as orchards, fields, or gardens (Gathmann et al. 1994; Tylianakis et al. 2005; Roberts et al. 2017) where the effect of distance to forest or forest edge on communities is explored.

In the present study, we focus on cavity-nesting bees and wasps utilising deadwood as a nesting substrate, using wooden trap-nests as a sampling method. We compare species numbers, community composition and parasitism rates of saproxylic aculeate Hymenoptera in a forest environment with different levels of canopy openness as well as in adjoining woody pastures with diverse open and shady patches. We also assess the importance of other environmental predictors such as the amount of deadwood or diversity in the vegetation structure surrounding nests of cavity-nesting bees and wasps in order to examine basic patterns in the requirements of this group.

Materials and methods

Study site and sampling design

The study was carried out in the former military training area of Milovice, Central Bohemia, Czech Republic (Fig. 1), in the Traviny grazing reserve and forests surrounding it (50.2836 N, 14.8761 E). In the past, the area used to be frequently disturbed by heavy army vehicles until its abandonment in 1989. Succession then took place for 26 years until 2015, when a natural grazing (trophic rewilding) conservation management was introduced including herds of wild horses (Exmoor ponies) and European bison (Bison bonasus) to the area. The Traviny grazing reserve is now 260 ha of wooded pastures with a heterogeneous habitat mosaic from taxonomically and structurally varied grasslands and bare soil, with scattered woody plants (predominantly hawthorn Crataegus sp., poplar Populus sp., and birch Betula pendula), to shady groves of closed canopy Crataegus-Prunus dominated shrubs. It is surrounded by open land, i.e., crop fields and a golf course, but also by a forest to the north and south, predominantly composed of mixed-species stands dominated by oak (Quercus petraea) and an admixture of other trees, e.g. pine (Pinus sylvestris), birch (Betula sp.), Populus spp., Prunus avium, etc.

Fig. 1
figure 1

Trap-nests and their distribution. Visualisation of the positions of traps (different colours for different microbiotopes) at the study site (a): brown dots = forest edge, light green = open gaps in forest (forest-open), dark green = shady forest, (forest-shady), violet dots = shady groves in pasture (pasture-shady), pink dots = solitary trees in pasture (pasture-open). The GIS land cover layer (b) shows different colours for different types of marked habitats, i.e., mature plantation forest, mixed forest, closed bush, clearings, tall grassland, short grassland, and bare ground; the circles around the traps represent the 50 m buffers around the traps. A simplified map of the Czech Republic with the study site location is also given (c). The cavity-nesting bees and wasps were collected using trap-nests composed of nine blocks with one drilled hole in each block (hole diameters of 6, 8, 10 mm) (d); one datalogger was installed in each microbiotope type in 2019 to record microclimatic conditions (the black datalogger is placed next to the trap). (Color figure online)

We used wooden trap-nests to sample cavity-nesting aculeate Hymenoptera in the wooded pasture and the adjoining forest. The trap-nests were composed of nine wooden blocks (3 × 3 × 10 cm each) with one drilled cavity in each block (Fig. 1). The drilled cavities were of three different diameters (6, 8, and 10 mm); each trap-nest thus contained three blocks of each diameter. We selected these diameters based on prior knowledge of the local fauna and their preferred nesting cavity sizes, in order to create nesting opportunities for most of the locally present species. The trap-nests were attached to tree or shrub trunks at approximately 1.5 m above ground with cavity openings facing southeast. The trap-nests were installed in the wooded pasture as well as in the adjoining forest, but in microbiotopes with different levels of canopy openness. These microbiotopes were: (i) south-facing forest edge (i.e. the border between the wooded pasture and forest), (ii) shady forest (places inside the forest with high canopy cover, hereinafter as ‘forest–shady’), (iii), open gaps in forest (gaps of different sizes with low canopy cover, hereinafter as ‘forest–open’), (iv) solitary trees in pasture (‘pasture–open’), and (v) shady groves in pasture (places inside the pasture with high canopy cover of trees, hereinafter as ‘pasture–shady’) (Fig. 1a). Therefore, we sampled both open and shady environments in two contrasting habitats and within a short flying distance, accessible for all local species of aculeate Hymenoptera. Twenty trap-nests were installed in each microbiotope, thus altogether 100 trap-nests, but with half the traps installed in 2018, and the other half in 2019.

Trap-nests were installed from 11 May–9 September in 2018 and from 4 May–14 September in 2019 and checked biweekly for occupancy. Occupied blocks were taken for rearing and replaced with empty blocks of the same cavity diameter. This was done to keep the same number of nesting opportunities throughout the whole sampling period (hence to keep the attractiveness of the trap the same) so that even species that are active in the middle of the season or later could find a place to nest. The rearing took place in the laboratory at room temperature until November; each block was covered with mesh immediately after collection and emerging adults were taken for identification. Some species of aculeate Hymenoptera overwinter before emerging, therefore, during the winter months (December and January), blocks were deposited in a climate box at 0 °C and 60% humidity. After overwintering, the rearing continued until the emergence rate of adults dropped to almost nil, then the trap-nests were all opened, and all developed specimens were also collected for identification as their inability to emerge could have been caused by handling of the block during fieldwork or in the laboratory rather than by insufficient conditions of their original microbiotope. All emerged specimens of aculeate Hymenoptera were identified to species level where possible according to the available literature (Schmid-Egger 2002; Amiet et al. 2004; Paukkunen et al. 2015). The voucher specimens were stored in the depository of the Institute of Entomology, Biology Centre CAS (IECA; Evenhuis 2023). All species records were uploaded to NDOP (species occurrence database) of the Nature Conservation Agency of the Czech Republic.

For each trap-nest, we recorded several environmental variables describing the immediate surroundings of the trap, such as openness, amount of deadwood in 2 and 10 m around the trap, the amount of standing or downed deadwood, the number of trees around the trap, or the mean diameter of the trees around the trap (Table 1), and we also calculated several variables describing the amount of habitat types and their diversity at 50 and 150 m around the traps using Geographic Information Systems (GIS) (Fig. 1b). The area of the study site was classified into land-cover categories based on aerial photographs from the years of study (2018, 2019). All land-cover estimations were performed with ArcGIS Pro software (ESRI 2011). The pixel resolution of aerial photographs across the study site was resampled to 1 m2. The forest land-cover categories were created by means of manual vectorization based on a previous field survey. Land-cover categories in forest were: plantations, mixed closed forest, open forest, semi-open forest, and clearing. The vegetation cover of the wooded pasture was classified by unsupervised K-means pixel-based clustering (Hamfelt et al. 2011). Based on K-means classification and following field interpretation, the main land-cover categories were: closed bushes, scattered bushes, tall grassland, short grassland, sparse grass, and bare ground. See Table 1 for more details about the recorded environmental variables.

Table 1 List of recorded environmental variables with their descriptions, units, and observed range

In 2019, we installed one microclimate datalogger in each of the five studied microbiotopes in order to illustrate potential differences in temperature, humidity, and dew point. The loggers were placed next to the traps (Fig. 1d) and were set to record data every hour during the entire sampling period (for microclimate data overview see Table S1).

Statistical analysis

We tested the effect of microbiotope (forest edge, forest-shady, forest-open, pasture-open, pasture-shady) and the effect of environmental variables on species richness and community composition of aculeate Hymenoptera (bees and wasps) emerging from the trap-nests.

Assuming spatially autocorrelated structure of our data, we fitted generalized linear mixed models with Poisson distribution (log link function) using the ‘glmmTMB’ package (Brooks et al. 2017) in R 4.3.1. (R Core Team 2023) with covariance structure based on the spatial coordinates of traps. We tested the effect of microbiotope (explanatory factor variable with five levels) on total species richness of aculeate Hymenoptera (as a response variable), and then separately on richness of nesters (i.e., species that actively build their brood cells) and richness of brood cell parasites (hereinafter ‘nest parasites’). Sampling year was added to the model as a covariate. Interaction between the effects of microbiotope and year was also tested to see whether the microbiotopes affected species numbers differently in different years.

Then we performed a forward selection of all other environmental variables (without microbiotope type). We first fitted a null model containing richness of hymenopterans as a response variable, intercept, and sampling year as a covariate and then added sequentially significant variables into the model starting with the variables with the lowest AIC value in comparison to the null model. We performed the forward selection procedure with the whole dataset but then also created two subsets: one containing only trap-nests from the forest (forest-shady, forest-open), and another one containing trap-nests only from the pasture (pasture-shady, pasture-open). We did this because the resolution of land cover variables differed between the two habitats; e.g., the diversity of land cover types was lower for trap-nests in the forest than in the pasture, which might mask the potential effect of it on occupancy by bees and wasps.

We then analysed the parasitism rate in each microbiotope using the ratio between the number of emerged individuals of nest parasites and all emerged individuals (nest parasites and nesters) from each trap. As nearly all aculeate hymenopteran nest parasites replace one host larva with one larva of their own, each emerged nest parasite also represents one host larva which was removed or devoured by the nest parasite. We used a generalized linear mixed model with binomial distribution (logit link function) with parasitism rate in each trap as a response variable, microbiotope as an explanatory variable, and sampling year as a covariate. We added the covariance structure assuming spatial correlation between samples to the model. To evaluate host availability in each microbiotope, we displayed the total number of emerged individuals (abundance of all bees and wasps) in microbiotope types and tested the number of emerged individuals from traps using the generalized linear mixed model with Poisson distribution and spatial covariance structure.

Further, we analysed the effect of microbiotope type on community composition of cavity-nesting Hymenoptera using multivariate ordination methods. We used Principal Coordinates of Neighbouring Matrices (PCNM) to first filter out the effect of space (which was significant in preliminary analysis of community composition) and then to test the clear effect of microbiotope type (used as an explanatory factor variable) with sampling year added as a covariate to the model. We then performed a forward selection of other measured environmental variables without microbiotope added to the model to assess if they affect species composition independently. We used a matrix of species abundances as response variables; the abundances were log-transformed and rare species down-weighted before calculating the models to lower the weight of species occurring in a single sample. Significance of the variables was tested by Monte Carlo tests with 999 permutations. The ordination analyses were carried out and visualised using Canoco 5.15 (Ter Braak and Šmilauer 2018).

Finally, we performed an indicator species analysis, using the ‘indicspecies’ package in R (De Cáceres and Legendre 2009), which estimates the strength of associations of species to levels of a factor variable. With this approach we assessed whether some species are indicative of a particular microbiotope type or combinations of up to three types.


During the 2-year sampling of cavity-nesting aculeate Hymenoptera, we reared 26 species (824 individuals) of bees, wasps, and their nest parasites. These included seven bee species (293 individuals), 14 wasp species (including Vespidae, Pompilidae, Sapygidae, and Crabronidae) (464 individuals), and five species of cuckoo wasps (67 individuals). Out of these, 19 species (753 individuals) were true cavity nesters, and seven species (71 individuals) were brood cell parasites (for the list of all species, see Table S2).

The regression analyses showed no effect of microbiotope on total species richness (χ2(4) = 4.92, P = 0.296) (Fig. 2a). On average, 1.5 species emerged from a trap. On the other hand, there was a significant effect of microbiotope on the number of nester species (χ2(4) = 11.04, P = 0.026), with the lowest numbers of nesters found in pasture-open biotope and the highest at the forest edge (Fig. 2b). The number of nest parasites was highest in pasture-shady biotope and lowest at the edge, but the effect of microbiotope overall was not significant (χ2(4) = 9.05 P = 0.059) (Fig. 2c). The interactions between sampling year and microbiotope were not significant, revealing that the effect of microbiotope was independent of year. Only sampling year was thus used as a covariate in the models. The test statistics are given in Table 2; coefficient estimates are displayed in Table S3.

Fig. 2
figure 2

Boxplots showing (a) the total species richness of aculeate Hymenoptera, (b) nester species richness, and (c) nest parasite species richness in different microbiotopes. The thick lines denote median values; the boxes cover 0.25 to 0.75 percentile of the data. Letters above boxplots indicate statistically significant differences based on Tukey HSD post-hoc comparisons

Table 2 Results of the generalised linear mixed models with Poisson distribution testing the effect of microbiotope (edge, forest-open, forest-shady, pasture-open, pasture-shady) and sampling year (covariate) on the number of all cavity-nesting species of aculeate Hymenoptera and on the number of nester species and nest parasite species, separately

Forward selection testing the effect of other environmental variables on species richness showed no significant association when the whole dataset (100 traps) was used, and also when the subset comprising traps from forest was used. However, when the subset of traps from pasture was used, the analysis revealed a significant positive effect of diversity of habitats in 50 m around the traps (χ2(1) = 5.64, P = 0.017); thus the greater the diversity of habitats around traps, the greater the number of species in traps.

The analysis of parasitism rate revealed a significant effect of microbiotope (χ2(4) = 12.31, P = 0.015); the pasture-shady biotope had a greater proportion of parasitised brood cells (mean 0.17) than the other microbiotopes (mean 0.06). Parasitism rates are displayed in Fig. 3 along with total abundances (representing brood cell availability); the coefficient estimates of the model are in Table 3. Microbiotope type did not affect abundance of bees and wasps in trap-nests significantly (χ2(4) = 9.06, P = 0.059) (Fig. S2).

Fig. 3
figure 3

Observed parasitism rate for all five studied microbiotopes, with mean parasitism rates displayed as coloured diamonds. Letters above boxplots indicate statistically significant differences based on Tukey HSD post-hoc comparisons. The parasitism rate (a) was calculated as a proportion of individuals of nest parasites from all emerging individuals; i.e., abundance of nesters and nest parasites together, and these abundances (b) are displayed for context of the number of possible hosts

Table 3 Coefficient estimates of the generalised linear mixed model with binomial distribution testing the effect of microbiotope (edge, forest-open, forest-shady, pasture-open, pasture-shady) and sampling year on the parasitism rate (proportion of emerged nest parasite individuals to all emerged individuals)

Principal Coordinates of Neighbouring Matrices (PCNM) revealed significant effect of microbiotope on species composition of cavity-nesting Hymenoptera (pseudo-F = 1.6, P = 0.006, expl. variation = 6.84%) after filtering out the effect of space and the effect of sampling year. The analysis showed that the pasture-open microbiotope differed greatly from the forest habitats and that forest-shady harboured the most distinct composition from other microbiotopes, as it was primarily dominated by three wasp species and one nest parasite associated with wasps. There was also a visible gradient of community change going from forest edge, through forest-open to forest-shady microbiotope. The ordination diagram is displayed in Fig. 4. Other environmental variables did not have any effect after filtering out the effect of space and the effect of sampling year.

Fig. 4
figure 4

Ordination diagram of species composition based on the Principal Coordinates of Neighbouring Matrices (PCNM) analysis. The diagram shows the species composition with respect to microbiotope type after filtering out the effects of space and sampling year. The first two canonical axes are displayed: the first axis horizontally, second axis vertically. Symbols for species depend on life histories: triangle = wasp/predatory parasitoid; upside-down triangle = bee/pollen collector; diamond = nest parasite/kleptoparasite. The list of non-abbreviated species names is in the Supplementary information section, Table S2

Total amount of deadwood and amount of deadwood of diverse types did not affect the richness or community composition of cavity-nesting Hymenoptera, despite that the variation in the variables was high (Fig. S1).

The indicator species analysis revealed that Osmia bicornis had high fidelity to forest edge and forest-open microbiotopes; and Ancistrocerus nigricornis and Chrysis terminata, its nest parasite, had strong association with both pasture microbiotopes (open and shady) (Table S4). Two more species, Osmia caerulescens and Chrysis solida, were identified by the analysis as highly specific for forest edge and pasture-shady, respectively.


We investigated saproxylic aculeate Hymenoptera in different habitats of temperate deciduous woodland; and for the first time, we bring information on their nesting preferences in association with canopy openness, amount of deadwood, and other characteristics. We did not find any effect of amount of deadwood or its diversity on the richness and community composition of bees and wasps. Only canopy openness of habitats affected the species composition of the studied assemblages, which corroborates the role of light availability as a major driver of saproxylic insect biodiversity (Fayt et al. 2006; Koch Widerberg et al. 2012; Müller et al. 2015; Thorn et al. 2016). We found that shady habitats in closed-canopy forest hosted a different species composition, dominated by wasps, than habitats in open wooded pasture or forest edge, despite that the microbiotopes were in immediate proximity, and thus within foraging distance of the studied aculeate Hymenoptera. This suggests that the cavity-nesting Hymenoptera are very selective about their nesting sites. It seems that they select the place to nest based on the quality of the nesting site and its immediate surroundings rather than based on the spatial arrangement of the habitats (Morato and Martins 2006; Grundel et al. 2010), because the habitats with different canopy openness hosted different communities even if they were located close together.

The importance of broader habitat context

Total species numbers and numbers of parasite species did not differ between microbiotopes; the differences were significant only for the number of nester species, but here the difference was relatively small. However, the differences in community composition were relatively substantial, with little overlap between closed-canopy forest, forest edge, and open pasture. Especially the closed-canopy forest biotope hosted communities dominated by wasps, whereas the microbiotopes in pasture, but also at the edge, were predominantly utilised by bees, and a greater share of nest parasites was found there. This suggests that the forest and the pasture, although closely neighbouring, represent distinct habitats and neither serves as a species pool for the other. However, at the same time, the two forest microbiotopes were also relatively distinct, with open patches in forest being closer to the open habitats with their assemblages (Fig. 4), suggesting that heterogeneity in openness may diversify the species assemblages in forests, but in more open habitats the locally measured openness may play a less significant role. The differences between communities of the forest and the pasture were further pronounced by the finding that the number of species in pasture increased with diversity of habitats within a 50 m radius around the trap, whereas richness in forest was unaffected by habitat diversity in their surroundings. This may be associated with structural differences between particular vegetation types. In the pasture, places with short-sward grass, tall grass, or bushes may represent very different structures for bees or wasps, and their richness can be driven by the diversity of these vegetation types, or by variation in the availability of flowers among these vegetation types throughout the season. On the contrary, forests represent a relatively uniform habitat for most of the rotation cycle, so the structural difference between e.g., a 20 year-old stand and a 70 year-old stand may be very small for bees and wasps. Also, flower availability in forests differs from pastures, with the potentially strong effect of spring leaf out and canopy flowering on communities of pollinators and predators in whole forest environments (Urban-Mead et al. 2021; Allen and Davies 2023).

Our results thus point to the importance of broader habitat context already revealed in other studies (Hoehn et al. 2010; Schüepp et al. 2011; Rösch et al. 2013). Bees and wasps primarily choose their nesting sites based on a broader scale. They differentiate between the structure of high forests and more open wooded pastures or savanna-like habitats, but after selecting the habitat, the canopy openness of the particular microbiotope within probably plays a less important role for occupation of the nests. The heterogeneity of canopy cover, however, appears to be of some importance to the studied insect group. This can be visible in our ordination diagram (Fig. 4), where homogenous microbiotopes (shady places in forest and open places of open pasture) appear most different, and microbiotopes which include a form of ecotone (open forest patch within shady forest, shady grove within open pasture or forest edge) are most similar in their community composition. Moreover, our collected microclimate data from dataloggers show relatively small differences in temperature, humidity, and dew point among all the five studied microbiotopes (Table S1). Even though both habitats, pasture as well as forest, offer sufficient deadwood nesting opportunities, they differ in availability of other resources like nest building material, host species, pollen and nectar resources, or prey (Dailey and Scott 2006; de Lima et al. 2020). Previous studies often highlighted the importance of resource-rich patches like flower strips, forest openings, or meadows for Hymenoptera diversity within supposedly poorer habitats like forests or production fields (Kevan 1999; Krewenka et al. 2011; Fabian et al. 2013; Bennett et al. 2014). At the same time, other studies assume benefits of forest cover or its proximity as potential nesting sites to communities of cavity nesters in surrounding open habitats (Tylianakis et al. 2006; Taki et al. 2008; Schüepp et al. 2011; da Rocha-Filho et al. 2017). For instance, Tylianakis (2006) found increasing distance from forest to positively affect the diversity of cavity-nesting bees, but negatively that of cavity-nesting wasps. This is in line with our results, as forest habitat was dominated by wasps, whereas pasture by bees. Different life-histories of the two guilds are responsible for the pattern. Bees are more affected by presence of flower resources, as they must provide their progeny with pollen and nectar (Michener 2007), making the forest habitat less suitable for nesting, whereas wasps are predatory and provide their larvae with preyed insects and spiders (Morato and Martins 2006; Brock et al. 2021). The pattern is, however, not universal in both guilds. In our study, for example, a mason bee Osmia bicornis was found to nest in the forest openings and forest edges, potentially because it frequently visits oaks and other trees for pollen collection (Splitt et al. 2021); and conversely, a potter wasp Ancistrocerus nigricornis preferred to nest in the pasture (Table S2 and S4).

We studied the nesting requirements of saproxylic bees and wasps, and thus our results offer a possible comparison with saproxylic beetles, the model group traditionally used in deadwood ecology. Communities of saproxylic beetles are largely affected by light conditions, rich assemblages are often concentrated to forest edges, openings, clearings, or open-grown trees outside forests (Bouget et al. 2014; Horak et al. 2014; Sebek et al. 2016; Kozel et al. 2021). Sun exposure can be of even greater importance for saproxylic beetles than the amount of deadwood (Müller et al. 2015; Seibold et al. 2016). In production forests, diversity of saproxylic beetles peaks in early-successional stages, on clear-cuts from ca. 0 to 5 years after logging (Hilmers et al. 2018; Kozel et al. 2021). Then the homogeneous, shady structure of mature stands hosts poor assemblages dominated by generalists or mycetophagous beetles (Hilmers et al. 2018). In our study, the shady forest stands were not poorer in number of saproxylic bee and wasp species; they were similarly rich as other habitats, but hosted a different, wasp dominated community.

Lacking association with amount and diversity of deadwood

We did not find any association between deadwood, its amount and quality, and diversity of saproxylic bees and wasps. Deadwood is considered one of the key factors for saproxylic organisms, although its effect may largely be conditioned by sun exposure (Bässler et al. 2010; Müller et al. 2015; Hagge et al. 2019). It seems that the amount of deadwood and its diversity mostly affects saproxylic organisms like fungi and beetles, which use it for their development; i.e., they consume it during development and thus deplete the local deadwood resources over time (Jonsell et al. 1998; Fayt et al. 2006; Ulyshen and Šobotník 2018). Unlike such saproxylic organisms, cavity-nesting aculeate Hymenoptera only inhabit the deadwood cavities and do not consume deadwood itself; they are rather known to sanitize the cavities to prevent bacterial and fungal contamination of potential brood cells (Michener 2007). Aculeate Hymenoptera also possess much better flight capabilities in comparison to beetles; they forage effectively in the range of hundreds of metres (Gathmann and Tscharntke 2002; Greenleaf et al. 2007). This means that cavity-nesting bees and wasps may be virtually unaffected by the total amount of deadwood around their nesting site; the only important factor is the presence of a sufficiently large nest cavity, which can even be present even in small deadwood objects (Budrys et al. 2010). Taking this into account, cavity nesters can be expected to inhabit a cavity as long as it fulfils their microhabitat requirements; they may select nesting sites based on available nest building materials (type of soil, plant leaves) and food resources within foraging distance from the nest rather than based on the amount of deadwood (Gathmann and Tscharntke 2002; Potts et al. 2005; Greenleaf et al. 2007), as long as the amount is sufficient (Perlík et al. 2023) (Fig. S1). It would be interesting to test the association between the diversity of cavity-nesting Hymenoptera and the number of naturally occurring holes in the habitats. However, many naturally occurring holes are not easily recognisable, as they may often be cracks or irregularities in wood rather than circular holes. Such an investigation would require a further experimental approach. Also, large solitary trees, i.e. veteran trees, are known to support high saproxylic biodiversity as well as a high number of hymenopteran species (Sebek et al. 2016). In the case of saproxylic organisms, it is likely due to the availability of sunlit deadwood as well as the diversity of available microhabitats, crucial resources for most saproxylic insects (Kraus et al. 2016; Falk 2021). In the case of bees and wasps, the microhabitat availability likely plays a role together with large trees functioning as landmarks, i.e. navigation points, for foraging flying insects.

Parasitism rate

The highest parasitism rate, on average around 17%, was found in pasture-shady microbiotope, i.e., in the shady bush groves of the pasture; in other microbiotopes, the mean parasitism rate ranged from 1 to 10%, the lowest was found for forest edge. A review suggests that parasitism rate by hymenopteran enemies is generally below 10%, depending on region, onsite diversity of hosts and nest parasites; higher rates are fairly rare, but in some cases, the rate can exceed even 50% (Minckley and Danforth 2019). The parasitism rate has been found to be driven by richness and abundance of hosts (Staab et al. 2016; Eckerter et al. 2022) or by abundance of food resources (nectar and pollen in the case of bees, arthropod prey in the case of wasps) (Gámez-Virués et al. 2009; Grundel et al. 2010; Jha and Kremen 2013). In addition, microclimate is known to drive diversity of insects in habitats with different vegetation types or canopy cover (Seibold et al. 2016) and potentially affect the parasitism (Stangler et al.  2015). Dense vegetation (e.g. shrubs) may increase microclimate stability required by many insect groups, including hymenopterans, especially their developing stages (Dixon et al. 2009; De Frenne et al. 2021; Wood et al. 2020).

In our study, we did not find differences in the total species richness among the microbiotopes, and the abundances of all bees and wasps were similar (Figs. 3, S2). Therefore, the higher parasitism rate cannot be explained by host diversity or abundance. The significant difference in parasitism rate between forest edge and shady groves in pasture might potentially be explained by resource availability in the broader area around the microbiotope. Higher parasitism rates in sites closer to grasslands (potential resource-rich habitat) were revealed in Tscharntke et al. (1998). In our setting, the forest edges were an ecotone of two structurally different habitats, with pasture and forest providing different types of resources, whereas shady groves in pasture were fully surrounded by the heterogeneous pasture. On the other hand, our results are not in agreement with other studies which reported highest parasitism rates at forest edges (Schüepp et al. 2011; da Rocha-Filho et al. 2017) in comparison to forest interior. When only forest habitats were studied, clearings were found to host highest species richness of hosts and associated nest parasites (Eckerter et al. 2022). Such a pattern can be seen in our results, but it was not statistically significant. The above-mentioned studies, however, used reed or bamboo trap-nests and not wooden ones as in our case. It is questionable if microclimate could have affected parasitism rate in combination with food resource availability. The groves in shady pasture had the lowest mean temperature and the lowest maximum temperature (Table S1) out of all microbiotopes, while the open pasture microbiotope had the highest variation in temperatures and humidity, thus potentially hindering development of some species. However, in general, the microclimate differences did not seem great enough; and we cannot reveal this association with our own data, as we used only a single datalogger for each microbiotope.


Heterogeneity of woodland biotopes or their successional stages is important for biodiversity of European cavity-nesting bees and wasps. None of the studied microbiotopes hosted considerably higher species richness than the others; however, we show that closed canopy forest habitats were most different in their communities from other more open patches. Patches with open canopies are underrepresented in current production forests as these are usually managed with an 80–120-year rotation cycle. Therefore, such forests do not include late-successional stages, with characteristic large amounts of deadwood and open canopy (Hilmers et al. 2018). The open phases of forest development are therefore mostly limited to clearings (ca. up to 10 years) or small gaps, accounting for only about 10% of the area of forests. This leads to potentially limited capacity for hosting a wide spectrum of saproxylic Hymenoptera. Moreover, the open forest phases are underrepresented even in most protected deciduous and mixed forests in lower and middle elevations of Europe where minimal intervention regimes prevail. In such places, larger scale disturbances occur rarely because their agents (fire, wind, insect outbreaks, large herbivores) have limited effect or have been suppressed on the landscape level. Therefore, forest management measures towards diversifying the canopy of the forest stands (Graser et al. 2023) are indispensable for supporting biodiversity of saproxylic Hymenoptera. At the same time, open habitats with grassy and woody vegetation (shrubs and trees) require measures towards habitat diversification by means of fine scale disturbances, which can be facilitated by temporally diversified grazing, mosaic mowing, heavy vehicle movement, selective burning, etc.