Ever since Alfred Russel Wallace's nineteenth-century observation that related terrestrial species are often separated on opposing riverbanks, major Amazonian rivers have been recognized as key drivers of speciation. However, rivers are dynamic entities whose widths and courses may vary through time. It thus remains unknown how effective rivers are at reducing gene flow and promoting speciation over long timescales. We fit demographic models to genomic sequences to reconstruct the history of gene flow in three pairs of avian taxa fully separated by different Amazonian rivers, and whose geographic ranges do not make contact in headwater regions where rivers may cease to be barriers. Models with gene flow were best fit but still supported an initial period without any gene flow, which ranged from 187 000 to over 959 000 years, suggesting that rivers are capable of initiating speciation through long stretches of allopatric divergence. Allopatry was followed by either bursts or prolonged episodes of gene flow that retarded genomic differentiation but did not fully homogenize populations. Our results support Amazonian rivers as key barriers that promoted speciation and the build-up of species richness, but they also suggest that river barriers are often leaky, with genomic divergence accumulating slowly owing to episodes of substantial gene flow.