Both the conversion of natural habitats to farmland and efforts at increasing the yield of existing crops contribute to a decline in biodiversity. As a consequence of land conversion, specialised species are restricted to remnants of original habitat patches, which are frequently isolated. This may lead to a genetic differentiation of the subpopulations. We used seven microsatellite markers to examine the genetic population structure of the grass snake, Natrix natrix (Linnaeus, 1758), sampled in remnants of pristine habitat embedded in an intensively used agricultural landscape in north-western Switzerland. The study area, a former wetland, has been drained and gradually converted into an agricultural plain in the last century, reducing the pristine habitat to approximately 1% of the entire area. The grass snake feeds almost entirely on amphibians, and is therefore associated with wetlands. In Central Europe, the species shows severe decline, most probably as a result of wetland drainage and decrease of amphibian populations. We found no genetically distinct grass snake populations in the study area covering 90 km2. This implies that there is an exchange of individuals between small remnants of original habitat. Thus, gene flow may prevent any genetic differentiation of subpopulations distributed over a relatively large area. Our results show that a specialized snake species can persist in an intensively used agricultural landscape, provided that suitable habitat patches are interconnected. © 2010 The Linnean Society of London, Biological Journal of the Linnean Society, 2010, 101, 51–58.