Variability in the spatial distribution of nematode communities in relation to the structural heterogeneity of the environment was studied in nine different microhabitats within a relatively small area of a natural oak forest in Bulgaria. Maturity and diversity indices, trophic structure and the distribution of colonizer-persister groups were applied to analyze the quality of substrate and ecological processes involved from a functional point of view. Two main groups of nematode communities, below- and above-ground, were distinguished in terms of the location of the microhabitats. Our results indicated a higher percentage similarity between nematode communities inhabiting microhabitats with a higher resemblance in substrate structure, and abiotic and biotic conditions than between microhabitats with more dissimilar microenvironmental conditions. The application of Detrended Correspondence Analysis helped to reveal two ecological gradients. The first one was from microhabitats characterized by smaller fluctuations in microclimatic conditions and nutrient supply to microhabitats with more adverse abiotic conditions and dynamics of food resources. Along this gradient from below- to above-ground microhabitats, the proportion of general opportunists (cp 2 taxa) increased, whereas the diversity, MI and the proportions of persisters (cp (3-5) taxa), decreased. Along the second gradient a gradual decrease in the decomposition rate within above-ground microhabitats was revealed, which was indicated by the proportion of enrichment opportunists (cp I taxa). The nematode communities of decaying wood had the most specific cp groups' distribution characterized by a high proportion of enrichment opportunists (colonizers). Each microhabitat has developed nematode communities with a characteristic trophic structure that was related to the relative importance of primary production and decomposition processes occurring within the microhabitat. The nematode communities of mosses growing on soil, stones and tree trunks had similar trophic structure dominated by bacterial-feeding nematode taxa. Our results supported the role of nematode communities as potential indicators of environmental conditions. (C) 2004 Elsevier Ltd. All rights reserved.