Beta diversity is defined as the variation in species composition among sites within a region of interest. This variation can be explained by different metacommunity paradigms, which are not mutually exclusive. While species sorting emphasizes the role of habitat features in affecting species composition, the neutral model suggests that constraints on dispersal are key assembly factors. We assessed the role of environmental features and spatial descriptors at multiple scales, in affecting avian beta diversity across a gradient of coastal habitats in southern Brazil. During the winter 2008 and summer 2009, we counted birds in 57 plots on a sandy beach and in coastal dunes and coastal grasslands (19 plots per habitat). We measured the structure of the herbaceous vegetation, the number of individual cactuses and shrubs, and the percentages of sand and water cover on each plot. We generated spatial filters by means of principal coordinates of neighbour matrices. We used variation partitioning based on redundancy analysis to decompose the fraction of beta diversity explained by environmental features and spatial descriptors at the scale of the entire gradient and within each habitat type. In both seasons, environmental variables explained 33% of beta diversity across the entire gradient. A third of this amount could also be explained by space, representing the fraction of species and environmental variables that were spatially structured. Pure environmental processes explained about 22% of beta diversity. Pure spatial control was weak at this larger scale. The opposite pattern was found within each habitat type, as there was no environmental control and neutral processes became dominant at this smaller scale. Our study thus presents a case where the strong environmental gradient filters out different species at the largest scale, whereas stochastic processes and spatial autocorrelation increase with loss of environmental heterogeneity within habitat types.