Author summary Many species occasionally hybridise and share genetic material with related species. Interspecific gene flow may be counteracted by natural selection at particular ‘barrier loci’. As a result, a pair of species can end up sharing more genetic variation in some parts of their genome than in others, and the tree of relationships in a group of species can differ from one part of the genome to another. We studied relationships and barriers among three species of Heliconius butterflies using whole-genome sequences from nine populations. We find that species relationships vary dramatically and predictably across the genome because the species barriers are more porous in genomic regions with higher recombination rates. This occurs because recombination determines how broadly the surrounding genome is affected by a barrier locus. The genome-wide pattern suggests that barrier loci are widespread across the genome. One consequence is that smaller chromosomes, which have higher recombination rates, tend to have weaker species barriers than longer chromosomes. The relationships among populations on small chromosomes therefore tend to be predicted by geography, rather than by which species they belong to. Our work shows how hybridisation, recombination, and selection interact to reshape species’ relationships.