BACKGROUND: Coral reefs are hotspots of biodiversity, yet processes of diversification in these ecosystems are poorly understood. The environmental heterogeneity of coral reef environments could be an important contributor to diversification, however, evidence supporting ecological speciation in corals is sparse. Here, we present data from a widespread coral species that reveals a strong association of host and symbiont lineages with specific habitats, consistent with distinct, sympatric gene pools that are maintained through ecologically-based selection. METHODOLOGY/PRINCIPAL FINDINGS: Populations of a common brooding coral, Seriatopora hystrix, were sampled from three adjacent reef habitats (spanning a ∼30 m depth range) at three locations on the Great Barrier Reef (n = 336). The populations were assessed for genetic structure using a combination of mitochondrial (putative control region) and nuclear (three microsatellites) markers for the coral host, and the ITS2 region of the ribosomal DNA for the algal symbionts (Symbiodinium). Our results show concordant genetic partitioning of both the coral host and its symbionts across the different habitats, independent of sampling location. CONCLUSIONS/SIGNIFICANCE: This study demonstrates that coral populations and their associated symbionts can be highly structured across habitats on a single reef. Coral populations from adjacent habitats were found to be genetically isolated from each other, whereas genetic similarity was maintained across similar habitat types at different locations. The most parsimonious explanation for the observed genetic partitioning across habitats is that adaptation to the local environment has caused ecological divergence of distinct genetic groups within S. hystrix.