The present study shows spatial patterns in the faunal assemblage of decaying wood and sediments, with emphasis on the polychaetes. The survey was executed across a salinity gradient in a tropical mangrove estuary of Costa Rica. To capture the organisms we analyzed decomposing logs found in the Térraba mangrove and sediment samples were taken with a corer in the sand bottom. Seven different phyla were found in the sediment samples. Of the 192 individuals found in the sediment samples, 18 were polychaetes belonging to nine families and 11 species. Analyses of decaying wood resulted in 2 564 individuals distributed in five phyla. Polychaetes accounted for 429 individuals belonging to eight families and 16 species. Although, polychaetes were more abundant in decaying wood, and their diversity was lower. The abundance of polychaetes in decaying wood was negatively correlated with the number of individuals of Mollusca, Hexapoda and Crustacea. A change in the composition of polychaetes in decaying wood was found along the salinity gradient of this estuarine zone. Dissimilarities in the composition of benthic fauna in decaying wood and sediments in the Térraba mangrove showed that biodiversity was increased by the microhabitats inside the mangrove forest. Finally, several genera or species of polychaetes are new records for Costa Rica and the Central American Pacific Coast.

Keywords: Térraba mangrove, Namaneridinae, biodiversity, estuarine ecology, polychaetes