High-mountain areas often exhibit high soil heterogeneity, which allows for the close coexistence of plant species and communities with contrasting resource requirements. This study investigated the nutritional factors driving the mosaic distribution of Nardus stricta L. grasslands and chalk grasslands dominated by forbs in the subalpine southern Pyrenees (Spain). The concentrations of C, N, P, S, K, Ca and fiber fractions in herbage were analyzed in relation to soil nutrient availability; soil β-glucosidase, urease, phosphatase and arylsulfatase activities; and plant species and functional type compositions. The chalk grassland showed higher N:P ratios in herbage and higher enzyme demand for P relative to N in the soil, which indicates a greater limitation of P versus N compared to Nardus grassland. This limitation was related to the higher soil and plant Ca levels in the chalk grassland, where the calcareous bedrock lies close to the soil surface. In the Nardus grasslands, the alleviation of P limitation translated into increased productivity and the replacement of forbs with taller graminoids rich in structural carbohydrates, which was mirrored by greater β-D-glucosidase activity. The plant N:K and P:K ratios indicated potential K deficiency in both grasslands, which resulted from decreased uptake of K in competition with Ca, as indicated by the correlation between plant K and the soil K+:Ca2+ ratio. Our results highlight the effect of the heterogeneity of soil nutrient constraints, mediated by stoichiometry and dependent on microtopography, on the biodiversity of high-mountain ecosystems.