Aim: Fish community composition is shaped by current and historical factors. In recently formed ecosystems, however, as the Quaternary coastal lagoons of South America, the influence of historical factors has less frequently been investigated. The low rate of endemism in these lagoons suggests a limited role for speciation while their dynamic formation history suggests local extinction and dispersal limitation could have affected present species composition. We aimed to assess the influence of past and current factors on the beta diversity of those communities and explore the main processes involved. Location: Atlantic coast of South America. Taxon: Fishes (173 species). Methods: We built a dataset of species occurrence in 129 lagoons across eight freshwater ecoregions of the world (FEOWs) located between latitudes 0° and 36°, and calculated beta diversity (βjac) and its turnover (βjtu) and nestedness (βjne) components. We used a partial Mantel test and multiple regressions on distance matrices to evaluate the importance of past and current factors, and of geographical distance in determining beta diversity. Past variables were those representing the historical freshwater habitat during the last glacial maximum (LGM), and contemporary variables were those related to current habitat. Results: We found high values of βjac within the FEOWs, with βjtu prevailing over βjne. Both past (palaeodrainage) and current (drainage area, salinity and lagoon area) factors affected species dissimilarity (βjac = 46%) and its components (βjtu = 44% and βjne = 20%), although explanation was, in part, shared with geographical distance. Individually, the influence of past factors was prevalent in beta diversity and its components. Main conclusions: The large influence of the past factors on beta diversity suggests that major changes in the availability of freshwater habitats and connectivity since the Pleistocene must have affected the colonization, extinction and recolonization processes of fishes along the eastern coast of South America. We suggest that the high beta diversity values result from limited dispersal after extinctions in the LGM. The dissimilar freshwater fish communities currently seen result from heterogeneous subsets of the regional species pool that persisted in landscape refuges during past sea level increases and then recolonized coastal lagoons. [ABSTRACT FROM AUTHOR]