Accurate knowledge of the distribution of rare species remains a great challenge in conservation biology because these species are prone to extinction and the number of species becoming rare is increasing. However, the distribution of rare species is usually difficult to delimit because of their low abundances and/or small distribution ranges. These difficulties are even greater when they are sympatric with morphologically similar species that can lead to identification errors. Here, we use barn owl (Tyto alba) pellets to infer, indirectly, potential habitat associations of the lesser white‐toothed shrew (Crocidura suaveolens) in the Gulf of Cádiz, south‐western Iberia and to clarify the distribution of the species in this region. In the Gulf of Cádiz, C. suaveolens is a rare species that lives in sympatry with its congener, the greater white‐toothed shrew (Crocidura russula), a much more abundant and extremely similar species. Through several indirect lines of evidence we inferred a possible association of C. suaveolens with tidal marsh habitat. This was a very surprising finding since C. suaveolens is a habitat generalist throughout its global distribution range. The species presented a highly restricted distribution in the Gulf of Cádiz occurring only in four tidal marshes. The causes of this limited distribution remain poorly understood to date, but our results are consistent with the hypothesis that C. suaveolens was displaced to tidal marshes through competitive exclusion by C. russula, although the geomorphological history of the tidal marshes of the Gulf of Cádiz may also explain its regional distribution and the phylogeographical patterns recently described in the region.