1. Prominent theories of plant defence have predicted that plants growing on nutrient-poor soils produce more phenolic defence compounds than those on richer soils. Only recently has the Protein Competition Model (PCM) of phenolic allocation suggested that N and P limitation could have different effects because the nutrients are involved in different cellular metabolic processes. 2. We extend the prediction of the PCM and hypothesize that N will have a greater influence on the production of phenolic defensive compounds than P availability, because N limitation reduces protein production and thus competition for phenylalanine, a precursor of many phenolic compounds. In contrast, P acts as a recyclable cofactor in these reactions, allowing protein and hence phenolic production to continue under low P conditions. 3. We test this hypothesis by comparing the foliar concentrations of phenolic compounds in (i) phenotypes of 21 species growing on P-rich alluvial terraces and P-depleted marine terraces in southern New Zealand, and (ii) 87 species growing under similar climates on comparatively P-rich soils in New Zealand vs. P-depleted soils in Tasmania. 4. Foliar P concentrations of plants from the marine terraces were about half those of plants from alluvial soils, and much lower in Tasmania than in New Zealand. However, foliar concentrations of N and phenolic compounds were similar across sites in both comparisons, supporting the hypothesis that N availability is a more important determinant of plant investment in phenolic defensive compounds than P availability. We found no indication that reduced soil P levels influenced plant concentrations of phenolic compounds. There was wide variation in the foliar N and P concentrations among species, and those with low foliar nutrient concentrations produced more phenolics (including condensed tannins). 5. Our study is the first trait comparison extending beyond standard leaf economics to include secondary metabolites related to defence in forest plants, and emphasizes that N and P have different influences on the production of phenolic defence compounds.