Covering <0·1% of the ocean’s surface, coral reefs harbour about one-third of all marine fishes or c. 5000 species. Allopatry (geographic isolation) is believed to be the primary mode of speciation, yet few biogeographic barriers exist between reefs, and most reef fishes have a pelagic larval stage capable of extensive dispersal. Under these circumstances, why are there so many species of reef fishes? Since most biogeographic barriers in the oceans are either spatially or temporally permeable on a relatively short time frame, the requirement of isolation during allopatric speciation is hard to satisfy. Evidence from empirical and theoretical studies, the biological characteristics of coral reefs, and a reanalysis of biogeographic barriers indicate that sympatric speciation is possible but not common at small spatial scales and that parapatric speciation is a common (and probably the prevalent) mode of diversification in coral-reef fishes. Regardless of the speciation mode, previous hypotheses of accelerated diversification in the Pleistocene due to sea level fluctuations are not supported by phylogenetic analyses. Recent developments in the area of comparative genomics can fuel a new revolution in the way marine speciation is studied.