The family Melanotaeniidae (rainbowfishes) represents the largest monophyletic group of freshwater fishes found in Australia and New Guinea. The family consists of seven genera and a total of 81 species, which are broadly distributed throughout the region. We conducted a phylogenetic analysis of Melanotaeniidae based on nearly complete taxonomic sampling of all species. We sequenced seven protein coding mitochondrial genes and the first two introns of the nuclear S7 gene, for a total of 6827 base pairs. Our goal was to use the phylogeny to infer the biogeographic history of rainbowfishes in this region, to provide a framework for the timing of divergence within the family, and to test for possible introgression between species. We found strong support for the monophyly of Melanotaeniidae. Three species-poor genera-Cairnsichthys, Rhadinocentrus and Iriatherina-were all resolved as early branching lineages within the family. The three species-rich genera-Melanotaenia, Chilatherina and Glossolepis-did not form a single monophyletic group, but instead formed three monophyletic groups endemic to discrete geographic regions: western New Guinea, northern New Guinea, and southern New Guinea plus Australia, respectively. All three geographic regions also contained three to four additional lineages that were separated by large genetic divergences and were frequently sympatric (except in western New Guinea). Our molecular clock results provide much older estimates of divergence than some aspects of the present geological setting. For instance, the formation of the present day Central Highlands, the integration of the Birds Head region with the rest of New Guinea, and the present proximate position of Waigeo and Batanta islands relative to the Birds Head, are all younger than the rainbowfishes living there based on our molecular clock estimates. We also identified ten species that have likely experienced historical introgression. Most introgression events were between different groups within the northern New Guinea lineage and the Southern New Guinea/Australian lineages. Finally, we identified nearly 20 undescribed species within Melanotaeniidae, demonstrating that much work remains in describing freshwater fish diversity in this region.