Summary1. Litter quality is an important ecosystem factor, which may affect undergrowth species richness via decomposition and organic layers directly, but also via longer-term changes in soil pH and moisture. The impact of beech trees with low-degradable and hornbeam trees with highdegradable litter on biodiversity and soil characteristics was studied in ancient forests on decalcified marl, a parent material sensitive to changes in pH and clay content, and characteristic of large parts of western Europe. 2. Vegetation analysis clearly separated beech and hornbeam plots, and showed that species richness was consistently lower under beech. Low species richness under beech was associated with low pH, high mass of the organic layer and low soil moisture, which were all interrelated. 3. Development of the organic layer was affected by, not only litter quality, but also by pH levels and soil moisture. Under hornbeam, older organic matter increased from almost zero to 1 kg m )2 in drier and more acid soil. Under beech tree litter decay was generally slow, but slowed further in acid soils, where older organic matter amounted to 4 kg m )2 . 4. Soil moisture and pH levels were strongly related, possibly due to long-term soil development. Under hornbeam, which is more palatable to soil organisms, moisture, bulk density, clay content and pH were high. Acidification and clay eluviation may be counteracted by earthworms, which bring base cations and clay particles back to the surface, and stimulate erosion, so that the impermeable, clay-rich subsoil remains close to the surface. Soils remain base-rich and moist, which further stimulates litter decay and species richness. 5. The unpalatable beech showed low pH and clay content, and high porosity, air-filled pore space and depth to the impermeable subsoil. Acidification and clay eluviation may proceed uninhibited, because earthworm activity is low, and erosion limited by protective litter covers. This may lead to drier and more acid soils, which reduce litter decay and species richness even further. 6. Trees with low and high litter quality may thus act as an ecosystem engineer, and not only affect ecosystem functioning via mass of the organic layer, but also via longer-term changes in soil characteristics, which in turn affect species richness of the understorey.