Abstract Many invasion theories invoke resource competition as the primary mechanism of invader advantage. These include Darwin's naturalization hypothesis (DNH), which treats phylogenetic similarity as a proxy for niche overlap and competitive intensity, and the evolutionary imbalance hypothesis (EIH), which suggests the phylogenetic diversity (PD) of an introduced species’ native range is an indicator of its competitive ability. Few tests of invasion theory, however, consider habitat characteristics associated with the role of competition in community assembly. In particular, plant invasions of habitats characterized by high environmental stress and disturbance levels should rarely be driven by competition. This suggests tests of EIH and DNH are habitat dependent, and their relative importance in invasiveness models should be predictable based on habitat qualities related to competitive intensity. Using a dataset of plant invasions in New Zealand (NZ) natural areas that distinguishes naturalized species according to both habitat type and community impact, we evaluated the predictive ability of factors related to EIH, DNH and covariates including year of introduction, introduction mode and life history attributes, in driving species invasiveness. We hypothesized that EIH and DNH would be more important predictors of invasiveness in forested habitats and decline in importance as communities shifted towards those more dominated by herbaceous species and/or more sparsely vegetated. We found mixed support for the role of competition linked to DNH and EIH as a driver of invasions in relation to habitat type. Native range PD was among the best predictors of invasiveness in forests, and declined in importance in more disturbed habitats, supporting EIH. In contrast, phylogenetic nearest neighbour distance (PNND) of invaders to native communities was more important in disturbed environments, suggesting competition does not drive DNH. Further, for most habitats and across all of NZ, neither PD nor PNND was as important as year of introduction or life history and growth form attributes in predicting invasiveness. Synthesis. Although both native range PD and PNND predict the invasiveness of naturalized plants in NZ, the results of our habitat‐specific models indicate that only PD is consistent with an invasion mechanism based on competitive ability. Effects of PNND were greatest in grasslands that have been extensively modified by fire and grazing, suggesting they are more likely driven by invader pre‐adaptation to modified habitat conditions. Due to the importance of matching species' traits to environmental context, invasiveness risk assessments perform better when applied to invaders of particular habitats.