Host-race evolution is a prime candidate for sympatric speciation because host shifts must take place in the presence of both hosts. However, the geographic context in which the shift takes place may have strong allopatric or peripatric components if the primary host within a localized area is scarce or even goes extinct. Inference of the relative importance of the geographic mode of speciation may be gained from phylogeographic imprints. Here, we investigate the phylogeography of host races of the tephritid fly Tephritis conura from sympatric, parapatric and allopatric populations of Cirsium heterophyllum and Cirsium oleraceum (Asteraceae) in Europe, for addressing the age and direction, and the geographic context of host-race formation. Haplotype networks of the host races differed significantly in molecular diversity and topology. However, host-race haplotypes were nested within the same network, with a central haplotype H1 being the most common haplotype in both host races. C. heterophyllum flies were genetically more diverse and substructured than flies from C. oleraceum, suggesting that the latter is the derived race. The phylogeographic imprint indicates either that C. heterophyllum flies colonized C. oleraceum during range expansion or that heterophyllum flies went extinct in an area where oleraceum flies persisted (followed by re-immigration). These imprints are in concordance with peripatric diversification, probably in the European Alps and related to the last ice age, where the host-race diversification was largely completed before the postglacial range expansion on C. oleraceum to current areas of sympatry and parapatry with C. heterophyllum.