In Fennoscandian boreal forests, in which productivity in general is N limited, there are regular, topographically related variations in forest productivity and plant community composition. Regional surveys have demonstrated strong correlations among soil pH, N content, and base saturation on the one hand and plant productivity and community composition on the other, but the nature of these relationships is poorly understood. We studied in detail the variation in and controls of soil acidity, availability of N and P, and changes in community composition and plant nutrition along a short (only 90 m long) but extreme forest productivity gradient in northern Sweden, which ranged from a groundwater recharge area with low productivity to a very productive discharge area. The pH in the soil solution of the mor layer ranged from 3.5 in the recharge area to 6.4 in the discharge area, and it was strongly correlated with the base saturation of the exchange complex. Neither the acid strength of organic matter, the ionic strength of the soil solution, nor the quantity of acids could explain more than a minor part of this variation in pH. There were strong correlations between total N in the mor layer and soil solution pH (r = 0.97) and base saturation of the exchange complex (r = 0.88). At the poor end of the transect the concentration of inorganic N was very low in the mor, and plants with either ectomycorrhizae (ECM) or ericoid mycorrhizae (EM) dominated. With increasing pH, there was an increase in NH4 concentrations, while plants that potentially have arbuscular mycorrhizae (AM) became prominent along with ECM and EM species. In the discharge area, which comprised only the last 10 m of the transect, NO3 dominated over NH4 in the soil solution, the soil had a high capacity for net nitrification, and the vegetation was totally dominated by potentially AM or nonmycorrhizal herbs, some of which had high foliar nitrate reductase activity. Foliar and root N concentrations increased steeply towards the discharge area, but foliar P/N ratios declined below critical levels at the end of the transect. Root 32P uptake bioassays also indicated a P deficiency in the discharge area, where the soil total P content was high, while the concentration of PO4 in the soil solution was very low. The high capacity of the mor in the discharge area to adsorb PO4, due to the presence of organically complexed Fe and Fe-oxihydroxides, may explain the low PO4 concentrations. Our data indicate that the underlying factors influencing both productivity and community composition are pH and supply of base cations. Fundamental differences in exchange characteristics of soil and soil water underlie other related nutrient supply features, in particular the amount and availability of N. Our study of a single short topographic transect supported a previous suggestion based on a regional survey in Norway that variability in soil pH and the supply of base cations affects plant productivity and community composition via effects on N supply. Our data also encompass the interrelations between soil pH, soil N turnover, and the mycorrhizal type of dominant plant species, which, according to Read (1991), occur along long latitudinal or altitudinal climatic gradients. Through millennia discharge areas like the one observed by us have probably provided a relatively stable environment for plants demanding high soil pH and N supply, at the same time as surrounding recharge areas have been acidified naturally through podzolization.