Although parental care occurs in most phyla encompassing a wide array of forms, little is known about its evolution in invertebrates. Two types of egg capsules have been known among ovoviviparous New Zealand hydrobiid gastropods, elastic capsules and simple membranes. Based on a phylogenetic analysis using two mtDNA sequence fragments, I asked whether the second state was derived from the first or whether brooding had multiple origins. The evolution of ovoviviparity was also investigated in the context of habitat transition between brackish and freshwater. Maximum parsimony and Markov chain models of character state transformations in a maximum likelihood framework suggested that hydrobiids have invaded freshwater three times independently. Two of these invasions were followed by the evolution of ovoviviparity, probably in adaptation to changing water levels during periods of irregular precipitation. The syntopy of two congeneric species, one oviparous and the other one brooding, indicated that the transition between reproductive modes must have occurred rapidly.