Population structure and distribution of Terebralia palustris were compared with the environmental parameters within microhabitats in a monospecific stand of Avicennia marina in southern Mozambique. Stable carbon and nitrogen isotope analyses of T. palustris and potential food sources (leaves, pneumatophore epiphytes, and surface sediments) were examined to establish the feeding preferences of T. palustris. Stable isotope signatures of individuals of different size classes and from different microhabitats were compared with local food sources. Samples of surface sediments 2.5-10 m apart showed some variation (-21.2 parts per thousand to -23.0 parts per thousand) in d13C, probably due to different contributions from seagrasses, microalgae and mangrove leaves, while d15N values varied between 8.7 parts per thousand and 15.8 parts per thousand, indicating that there is a very high variability within a small-scale microcosm. Stable isotope signatures differed significantly between the T. palustris size classes and between individuals of the same size class, collected in different microhabitats. Results also suggested that smaller individuals feed on sediment, selecting mainly benthic microalgae, while larger individuals feed on sediment, epiphytes and mangrove leaves. Correlations were found between environmental parameters and gastropod population structure and distribution vs. the feeding preferences of individuals of different size classes and in different microhabitats. While organic content and the abundance of leaves were parameters that correlated best with the total density of gastropods (>85%), the abundance of pneumatophores and leaves, as well as grain size, correlated better with the gastropod size distribution (>65%). Young individuals (height < 3 cm) occur predominantly in microhabitats characterized by a low density of leaf litter and pneumatophores, reduced organic matter and larger grain size, these being characteristic of lower intertidal open areas that favour benthic microalgal growth. With increasing shell height, T. palustris individuals start occupying microhabitats; nearer the mangrove trees characterized by large densities of pneumatophores and litter, as well as sediments of smaller grain size, leading to higher organic matter availability in the sediment.