Biological invasions are a pervasive and costly environmental problem that has been the focus of intense management and research activities over the past half century. Yet accurate predictions of community susceptibility to invasion remain elusive. The diversity resistance hypothesis, which argues that diverse communities are highly competitive and readily resist invasion, is supported by both theory and experimental studies conducted at small spatial scales. However, there is also convincing evidence that the relationship between the diversity of native and invading species is positive when measured at regional scales. Although this latter relationship may arise from extrinsic factors, such as resource heterogeneity, that covary with diversity of native and invading species at large scales, the mechanisms conferring greater invasion resistance to diverse communities at local scales remain unknown. Using neighbourhood analyses, a technique from plant competition studies, we show here that species diversity in small experimental grassland plots enhances invasion resistance by increasing crowding and species richness in localized plant neighbourhoods. Both the establishment (number of invaders) and success (proportion of invaders that are large) of invading plants are reduced. These results suggest that local biodiversity represents an important line of defence against the spread of invaders.