The distribution of species in relation to latitude and altitude is of fundamental interest to ecologists and is expected to attain increasing importance as the Earth's climate continues to change. Species diversity is commonly greater at lower than higher latitudes on a global scale, and the similarity of communities frequently decreases with distance. Nevertheless, reasons for such patterns are not well understood. We investigated species richness and changes in community composition of mayflies (Ephemeroptera) over 13 degrees of latitude at 81 locations throughout New Zealand by light-trapping and the benthic sampling of streams. Mayflies were also sampled along an altitudinal gradient on a prominent inactive volcano in the east of North Island. Sampled streams were predominantly in the native forest, at a wide range of altitudes from sea level to c. 1000 m a. s. l. A total of 47 of the 59 described New Zealand mayflies were recorded during the study, along with five undescribed morphospecies. Species richness declined and the degree of dissimilarity (beta diversity) of mayfly communities increased significantly from north to south but less strongly with increasing altitude. Our results suggest that the southward decline in species richness has historical origins with the north of the country having acted as a major refuge and region of speciation during the Pleistocene. The increasing dissimilarity of the northern and southern communities may reflect an increasingly harsh climate, variable amounts of subsequent southward dispersal of northern species and, in the South Island, the presence of species which may have evolved in the newly uplifted mountains during the Miocene-Pliocene.