Populations of the specialist gall-forming fly, Urophora cardui (Diptera: Tephritidae), were studied at the western and eastern margins of its distribution. In western Europe U. cardui attacks the creeping thistle Cirsium arvense, whereas in eastern Europe, in the Ural mountains, it attacks Cirsium setosum, a taxon closely related to C. arvense. Gall densities are high in the Ural mountains and can be predicted by environmental variables. Compared to galls on C. arvense, those on C. setosum are on average larger. This indicates better performance of U. cardui on C. setosum in terms of cell numbers per gall. Despite the wide distribution of U. cardui, the dominant parasitoids are the same at the western and eastern ends of its distribution and the interactions between parasitoids and the host are similar. In general, we suggest that the synchronisation between the host plant species, the phytophage and the parasitoids is an important factor in the spatial ecology and evolution of this food web.