Western Australia's tropical bat fauna comprises two communities; both are strict ensembles. One involves up to 19 species and occupies mangrove forest; the other, its landward counterpart, involves up to 22 species. Each includes habitat-generalist, productivity-dependent and cave-dependent species, so they achieve their full diversity in mangrove or riparian ecosystems associated with cavernous landscapes. Periods of significantly reduced rainfall are recognised in the climate record of the last similar to 20 000 years, during which mangrove and upland riparian forests were the only highly productive ecosystems remaining in tropical Western Australia. During glacial cycles, these two refugia for mesic-adapted bats become geographically separated by the exposed continental shelf, a flat coastal plain more than 100 km wide. We review mangrove forests as evolutionary refuges during the Pleistocene, and use information on geographic range, endemism and habitat specificity to investigate the role of climatic and sea-level fluctuations in generating bat community structure. We conclude that mangrove forests provided a glacial refuge for all ensemble components; that the separation drove the evolution of two different ensembles. Northern Territory populations of Western Australia's landward and mangrove specialists occupy landward as well as mangrove ecosystems, implying that mangrove refugia were not accessible during glacials.