The current, virtually worldwide distribution of the house sparrow (Passer domesticus) is a result of its commensal relationship with humans. It has been suggested that long before the advent of agriculture, an early glacial advance resulted in two disjunct ranges of ancestral house sparrows – one in the Middle East and another on the Indian subcontinent. Differentiation during this period of isolation resulted in two major groups of subspecies: the domesticus group and the indicus group. According to this hypothesis, commensalism with humans would have evolved independently in the two regions and at least twice. An alternative hypothesis is that morphological differences between the subspecies represent very recent differentiation, following expansions from a single source. To test between these hypotheses, we analysed genetic variation at the mitochondrial DNA control region and at three nuclear loci from several house sparrow populations in Europe, Asia and North Africa. No differentiation between the indicus and domesticus groups was found, supporting the single origin hypothesis. One of the subspecies in the indicus group, P. d. bactrianus, differs ecologically from other house sparrows in being migratory and in preferentially breeding in natural habitat. We suggest that bactrianus represents a relict population of the ancestral, noncommensal house sparrow. When agricultural societies developed in the Middle East about 10 000 years ago, a local house sparrow population of the bactrianus type adapted to the novel environment and eventually became a sedentary, human commensal. As agriculture and human civilizations expanded, house sparrows experienced a correlated and massive expansion in range and numbers. The pattern of genetic variation analysed here is consistent with this scenario.