Abstract Subterranean estuaries are biogeochemically active coastal sites resulting from the underground mixing of fresh aquifer groundwater and seawater. In these systems, microbial activity can largely transform the chemical elements that may reach the sea through submarine groundwater discharge (SGD), but little is known about the microorganisms thriving in these land‐sea transition zones. We present the first spatially‐resolved characterization of the bacterial assemblages along a coastal aquifer in the NW Mediterranean, considering the entire subsurface salinity gradient. Combining bulk heterotrophic activity measurements, flow cytometry, microscopy and 16S rRNA gene sequencing we find large variations in prokaryotic abundances, cell size, activity and diversity at both the horizontal and vertical scales that reflect the pronounced physicochemical gradients. The parts of the transect most influenced by freshwater were characterized by smaller cells and lower prokaryotic abundances and heterotrophic production, but some activity hotspots were found at deep low‐oxygen saline groundwater sites enriched in nitrite and ammonium. Diverse, heterogeneous and highly endemic communities dominated by Proteobacteria, Patescibacteria, Desulfobacterota and Bacteroidota were observed throughout the aquifer, pointing to clearly differentiated prokaryotic niches across these transition zones and little microbial connectivity between groundwater and Mediterranean seawater habitats. Finally, experimental manipulations unveiled large increases in community heterotrophic activity driven by fast growth of some rare and site‐specific groundwater Proteobacteria. Our results indicate that prokaryotic communities within subterranean estuaries are highly heterogeneous in terms of biomass, activity and diversity, suggesting that their role in transforming nutrients will also vary spatially within these terrestrial–marine transition zones.