Behavioral ecology has successfully explained the diversity in social mating systems through differences in environmental conditions, but diversity in genetic mating systems is poorly understood. The difference is important in situations where parents care for extrapair young (EPY) originating from extrapair paternity (EPP), extrapair maternity (EPM), and intraspecific brood parasitism (IBP). In birds, IBP and EPM are rare, but EPP is widespread and highly variable among species and populations. Explanations for this variability are controversial, mainly because detailed ecological information is usually lacking in paternity studies. Here we present results of the first study to identify the ecological determinants of extrapair activities for both sexes of the same species, the water pipit (Anthus spinoletta). DNA fingerprints of 1052 young from 258 nests revealed EPP in 5.2% of the young from 12.4% of the nests. EPM and IBP, both involving egg dumping (EDP), each occurred in 0.5% of the young from 1.9% of the nests. Nests with and without EPY could not be distinguished by traits of the breeders and by reproductive succcess, but they differed with respect to ecology: nests with EPP young were characterized by asynchronous clutch initiation, nests with EPM and IBP young were characterized by higher overlap with neighboring territories and closer proximity to communal feeding sites. We suggest that chance events, resulting from the temporal and spatial distribution of broods, offer a better explanation for the occurence of extrapair activities than female search for genetic or phenotypic benefits. This possibility of "accidental" extrapair reproduction as an "ecological epiphenomenon" with low potential for selection should also be considered for species other than the water pipit.