ABSTRACT: The Amazon harbours one of the richest ecosystems on Earth. Such diversity is likely to be promoted by plant specialization, associated with the occurrence of a mosaic of landscape units. Here, we integrate ecological and phylogenetic data at different spatial scales to assess the importance of habitat specialization in driving compositional and phylogenetic variation across the Amazonian forest. To do so, we evaluated patterns of floristic dissimilarity and phylogenetic turnover, habitat association and phylogenetic structure in three different landscape units occurring in terra firme (Hilly and Terrace) and flooded forests (Igapó). We established two 1-ha tree plots in each of these landscape units at the Caparú Biological Station, SW Colombia, and measured edaphic, topographic and light variables. At large spatial scales, terra firme forests exhibited higher levels of species diversity and phylodiversity than flooded forests. These two types of forests showed conspicuous differences in species and phylogenetic composition, suggesting that environmental sorting due to flood is important, and can go beyond the species level. At a local level, landscape units showed floristic divergence, driven both by geographical distance and by edaphic specialization. In terms of phylogenetic structure, Igapó forests showed phylogenetic clustering, whereas Hilly and Terrace forests showed phylogenetic evenness. Within plots, however, local communities did not show any particular trend. Overall, our findings suggest that flooded forests, characterized by stressful environments, impose limits to species occurrence, whereas terra firme forests, more environmentally heterogeneous, are likely to provide a wider range of ecological conditions and therefore to bear higher diversity. Thus, Amazonia should be considered as a mosaic of landscape units, where the strength of habitat association depends upon their environmental properties.