Predation and microbial infections are the major causes of natural mortality for early life stages of oviparous species. The parental traits reducing the effects of predation are rather well described, whereas antimicrobial mechanisms enhancing offspring survival are largely unexplored. In this paper, we report that a male sexually dimorphic trait, the anal glands, of the redlip blenny (Ophioblennius atlanticus atlanticus) and the peacock blenny (Salaria pavo), two fish species with paternal egg care, produce a mucus enriched with antimicrobial substances. Histological and histochemical analyses showed that the anal glands of these species are characterized by the massive presence of mucus-secreting cells. Anal gland extracts, from both the hydrophilic and the hydrophobic protein fraction, exhibited a lysozyme-like activity. Field observations demonstrated that redlip blenny males, while performing egg care, rub the anal region over the nest internal surface, probably facilitating the transfer of mucus to eggs. These results strongly indicate that this sexually dimorphic trait is involved in egg defence against microbial infections.