Understanding the main processes that affect community similarity have been the focus of much ecological research. However, the relative effects of environmental and spatial aspects in structuring ecological communities is still unresolved and is probably scale-dependent. Here, we examine the effect of habitat identity and spatial distance on finegrained community similarity within a biogeographic transition zone. We compared four hypotheses: i) habitat identity alone, ii) spatial proximity alone, iii) non-interactive effects of both habitat identity and spatial proximity, and iv) interactive effect of habitat identity and spatial proximity. We explored these hypotheses for spiders in three fragmented landscapes located along the sharp climatic gradient of Southern Judea Lowlands (SJL), Israel. We sampled 14,854 spiders (from 199 species or morphospecies) in 644 samples, taken in 35 patches and stratified to nine different habitats. We calculated the Bray-Curtis similarity between all samples-pairs. We divided the pairwise values to four functional distance categories (same patch, different patches from the same landscape, adjacent landscapes and distant landscapes) and two habitat categories (same or different habitats) and compared them using non-parametric MANOVA. A significant interaction between habitat identity and spatial distance was found, such that the difference in mean similarity between same-habitat pairs and different-habitat pairs decreases with spatial distance. Additionally, community similarity decayed with spatial distance. Furthermore, at all distances, same-habitat pairs had higher similarity than different-habitats pairs. Our results support the fourth hypothesis of interactive effect of habitat identity and spatial proximity. We suggest that the environmental complexity of habitats or increased habitat specificity of species near the edge of their distribution range may explain this pattern. Thus, in transitions zones care should be taken when using habitats as surrogate of community composition in conservation planning since similar habitats in different locations are more likely to support different communities.