* In the current context of global habitat loss, a fundamental challenge is to understand how ecological processes interact to determine community composition. Despite the accumulating evidence base for global declines in bee populations, few studies have addressed the relative importance of local environmental and large-scale spatial factors in maintaining diverse bee communities outside of agricultural habitats, and particularly in areas protected for nature conservation. * We analysed bee community data that we collected from 40 Special Areas of Conservation representing five distinct European Natura 2000 priority habitats in Ireland, quantifying local habitat features within each site and surrounding land-use. Species data were collected in a nested sampling design composed of three hierarchical levels such as ‘site’, ‘habitat’ and ‘region’ and analysed using diversity partitioning. The species–environment relationship was also decomposed into regional-, landscape- and local-scales by variance partitioning using partial canonical correspondence analysis. * Wild bee species richness and abundance were highly dependent on habitat type, but the majority of regional diversity was contained within sites, as opposed to species turnover across sites and regions. Bee communities were primarily structured by local-scale factors associated with nesting resources and grazing regime, with non-Bombus taxa being more sensitive to landscape-scale differences in adjacent habitats than Bombus taxa. Regional-scale processes, such as species sorting along longitudinal gradients, were of minor importance in structuring bee communities in this system. * Synthesis and applications. Within habitats, local species richness, rather than species turnover at higher spatial scales, accounted for the majority of regional bee diversity. Local environmental factors were powerful determinants of community composition. Therefore, management effort prioritising the maintenance of a diversity of high-quality habitats within a broad network of protected areas best facilitates bee conservation in this system. At a regional level, schemes for conserving and restoring important bee habitats must be habitat- and taxon-specific, as the impact of individual local-scale factors and surrounding land-use on community composition is highly habitat- and taxon-dependent.