The increase of urban areas has led to a fragmentation of habitats for many forest-living species. Man-made parks might be a solution, but they can also act as sinks that are unable to maintain themselves without immigration from natural areas. Alternatively, parks might act as true metapopulations with extinctions and colonizations. In both cases, we can expect genetic variation to be reduced in the parks compared to the natural habitat. A third alternative is that the parks have sufficient reproduction to maintain themselves. To test these hypotheses, we analysed the pattern of genetic variation in the great tit (Parus major) in 12 parks in central Barcelona, and in an adjacent forest population using microsatellites. Genetic variation was not lower in the parks compared to the forest population, but larger, and gene flow was higher from the town to the forest compared to vice versa. We found a significant genetic differentiation among the parks, with a structure that only partly reflected the geographic position of the parks. Relatedness among individuals within parks was higher than expected by chance, although we found no evidence of kin groups. Assignment tests suggest that some parks are acting as net donors of individuals to other parks. © 2010 The Linnean Society of London, Biological Journal of the Linnean Society, 2010, 99, 9–19.