Parallel evolution of similar phenotypes provides strong evidence for the operation of natural selection. Where these phenotypes contribute to reproductive isolation, they further support a role for divergent, habitat-associated selection in speciation. However, the observation of pairs of divergent ecotypes currently occupying contrasting habitats in distinct geographical regions is not sufficient to infer parallel origins. Here we show striking parallel phenotypic divergence between populations of the rocky-shore gastropod, Littorina saxatilis, occupying contrasting habitats exposed to either wave action or crab predation. This divergence is associated with barriers to gene exchange but, nevertheless, genetic variation is more strongly structured by geography than by ecotype. Using approximate Bayesian analysis of sequence data and amplified fragment length polymorphism markers, we show that the ecotypes are likely to have arisen in the face of continuous gene flow and that the demographic separation of ecotypes has occurred in parallel at both regional and local scales. Parameter estimates suggest a long delay between colonization of a locality and ecotype formation, perhaps because the postglacial spread of crab populations was slower than the spread of snails. Adaptive differentiation may not be fully genetically independent despite being demographically parallel. These results provide new insight into a major model of ecologically driven speciation.