The type of matrix, the landscape surrounding habitat patches, may determine the distribution and function of local populations. However, the matrix is often heterogeneous, and its various components may differentially contribute to metapopulation processes at different spatial scales, a phenomenon that has rarely been investigated. The aim of this study was to estimate the relative importance of matrix composition and spatial scale, habitat quality, and management intensity on the occurrence and density of local populations of two endangered large blue butterflies: Phengaris teleius and P. nausithous. Presence and abundance data were assessed over two years, 2011–12, in 100 local patches within two heterogeneous regions (near Kraków and Tarnów, southern Poland). The matrix composition was analyzed at eight spatial scales. We observed high occupancy rates in both species, regions and years. With the exception of area and isolation, almost all of the matrix components contributed to Phengaris sp. densities. The different matrix components acted at different spatial scales (grassland cover within 4 and 3 km, field cover within 0.4 and 0.3 km and water cover within 4 km radii for P. teleius and P. nausithous, respectively) and provided the highest independent contribution to the butterfly densities. Additionally, the effects of a 0.4 km radius of forest cover and a food plant cover on P. teleius, and a 1 km radius of settlement cover and management intensity on P. nausithous densities were observed. Contrary to former studies we conclude that the matrix heterogeneity and spatial scale rather than general matrix type are of relevance for densities of butterflies. Conservation strategies for these umbrella species should concentrate on maintaining habitat quality and managing matrix composition at the most appropriate spatial scales.