International audience; Background: In vertebrates, it has been repeatedly demonstrated that genes encoding proteins involved in pathogen-recognition by adaptive immunity (e. g. MHC) are subject to intensive diversifying selection. On the other hand, the role and the type of selection processes shaping the evolution of innate-immunity genes are currently far less clear. In this study we analysed the natural variation and the evolutionary processes acting on two genes involved in the innate-immunity recognition of Microbe-Associated Molecular Patterns (MAMPs). Results: We sequenced genes encoding Toll-like receptor 4 (Tlr4) and 7 (Tlr7), two of the key bacterial-and viral-sensing receptors of innate immunity, across 23 species within the subfamily Murinae. Although we have shown that the phylogeny of both Tlr genes is largely congruent with the phylogeny of rodents based on a comparably sized non-immune sequence dataset, we also identified several potentially important discrepancies. The sequence analyses revealed that major parts of both Tlrs are evolving under strong purifying selection, likely due to functional constraints. Yet, also several signatures of positive selection have been found in both genes, with more intense signal in the bacterial-sensing Tlr4 than in the viral-sensing Tlr7. 92% and 100% of sites evolving under positive selection in Tlr4 and Tlr7, respectively, were located in the extracellular domain. Directly in the Ligand-Binding Region (LBR) of TLR4 we identified two rapidly evolving amino acid residues and one site under positive selection, all three likely involved in species-specific recognition of lipopolysaccharide of gram-negative bacteria. In contrast, all putative sites of LBRTLR7 involved in the detection of viral nucleic acids were highly conserved across rodents. Interspecific differences in the predicted 3D-structure of the LBR of both Tlrs were not related to phylogenetic history, while analyses of protein charges clearly discriminated Rattini and Murini clades. Conclusions: In consequence of the constraints given by the receptor protein function purifying selection has been a dominant force in evolution of Tlrs. Nevertheless, our results show that episodic diversifying parasite-mediated selection has shaped the present species-specific variability in rodent Tlrs. The intensity of diversifying selection was higher in Tlr4 than in Tlr7, presumably due to structural properties of their ligands.