The high potential for dispersal of many marine organisms often results in low population differentiation over large distances. Here, we report that dolphin communities living in very close geographic proximity (<16 km) but in two different environments - open coast and enclosed embayment - exhibit unexpected genetic differentiation at nine microsatellite loci. Results based on a fixation index and a Bayesian clustering approach suggested that gene flow between communities within an embayment is high, as is gene flow between coastal communities. However, lower gene flow between embayment and open coast communities translated into substantial genetic differentiation between dolphin communities from the two environments, and assignment of individuals into two populations. Along with patterns observed in 403 bp of the mitochondrial DNA control region, the results suggest that restriction of gene flow likely occurred in the last 6000 years, after coastal dolphins colonised the embayment. We hypothesise that factors such as fidelity to the local area and resource and behavioural specialisations may have played a major role in promoting and maintaining genetic subdivision between dolphins of the two environments. Importantly, our study shows that habitat type can rapidly promote extremely fine-scale genetic structure in a long-lived, highly mobile marine mammal.