All known populations of the Sardinian endemic Centaurea filiformis Viv. (Asteraceae) were studied in order to understand the impact of both geographic and ecological factors on the genetic structuring of this species. Fourteen populations and 234 individuals were sampled. The demographic structure of the populations and the reproductive ecology were estimated in 28 plots. Population genetic analyses were based on SSR markers. Genetic structure was investigated by spatial Bayesian methods. Average densities of 0.51 individuals m were detected, with a prevalence of adults. Ten species of pollinators were identified; C. filiformis ability to self-pollinate and myrmecochory were demonstrated experimentally. The populations displayed an average heterozygosity value of H = 0.576 and high genetic differentiation (overall F = 0.218). Bayesian analysis suggests that five is the most probable number of gene pools of origin. A strong correlation between geographic distances and genetic distances among populations was highlighted. The demographic population structure of C. filiformis is dominated by adults, suggesting that it is a stable-regressive or senile species, investing more in local persistence than colonisation ability. Despite the scattered distribution, the populations studied do not present evidence of genetic erosion. The analysis of genetic differentiation reveals very high differentiation levels among populations, thus indicating that effective barriers exist against gene flow. A general conclusion is that population distribution results in a clear genetic structure for the populations studied, and that geography and not ecology is shaping the present distribution of this species.