There are changes in the realized niches of species along environmental gradients, especially at the edge of their distribution where they become more specialized. A classical case is weeds of the Caucalidion alliance that spread with agriculture from the Fertile Crescent and thrive in a wide range of climates that differ from that prevailing in their native area. We used large data sets of vegetation collected in central Europe (3383 plots) and north-western Balkans (4505 plots) and used a co-occurrence species algorithm to calculate the specialist/generalist status of weed species. The change in the width of the ecological niches was tested using target species. Our assumptions were confirmed as the same characteristic species of Caucalidion weed vegetation in the north-western Balkans are more specialized in central Europe, where they occupy more basic habitats that vary less in terms of soil reaction. Testing niche theory using real data is especially important for nature conservation because specialists are more prone to decline in abundance or to go extinct