Palms (Arecaceae) are a distinctive, diverse and ecologically important element of tropical rainforest. Often numerous palm species co-occur locally in "palm communities" that span all strata of the forest. In South America, the palm family has a centre of diversity in the western Amazon basin where palms abound in all major habitats. Using a dataset including >340,000 palm individuals in 430 transects, we analysed species richness, compositional turnover, and phylogenetic structure of palm assemblages in this region. We found a strong relationship of alpha-diversity and species turnover to habitat, indicating niche assembly. Habitat associations were phylogenetically non- random, leading to, e.g., co-existence of close relatives on flood plains. Dispersal and biogeographic history had a clear effect on alpha diversity, gamma diversity, and species turnover, and to a lesser degree on phylogenetic assemblage structure. The results indicate that multiple drivers interact to determine palm diversity patterns in lowland rainforests. A major future challenge is adding the effect of plant-plant, plant-animal, and plant-pathogen interactions to the equation.