Whether sexual selection alone can drive the evolution of assortative mating in the presence of gene flow is a long-standing question in evolutionary biology. Here, we report a role for pairing dynamics of individuals when mate choice is mutual, which is sufficient for the evolution of assortative mating by sexual selection alone in the presence of gene flow. Through behavioural observation, individual-based simulation and population genetic analysis, we evaluate the pairing dynamics of coral reef fish in the genus Hypoplectrus (Serranidae), and the role these dynamics can play for the evolution of assortative mating. When mate choice is mutual and the stability of mating pairs is critical for reproductive success, the evolution of assortative mating in the presence of gene flow is not only possible, but is also a robust evolutionary outcome.