Effector proteins of innate immune systems recognize specific non-self epitopes. Tectonins are a family of β-propeller lectins conserved from bacteria to mammals that have been shown to bind bacterial lipopolysaccharide (LPS). We present experimental evidence that two Tectonins of fungal and animal origin have a specificity for O-methylated glycans. We show that Tectonin 2 of the mushroom Laccaria bicolor (Lb-Tec2) agglutinates Gram-negative bacteria and exerts toxicity toward the model nematode Caenorhabditis elegans, suggesting a role in fungal defense against bacteria and nematodes. Biochemical and genetic analysis of these interactions revealed that both bacterial agglutination and nematotoxicity of Lb-Tec2 depend on the recognition of methylated glycans, namely O-methylated mannose and fucose residues, as part of bacterial LPS and nematode cell-surface glycans. In addition, a C. elegans gene, termed samt-1, coding for a candidate membrane transport protein for the presumptive donor substrate of glycan methylation, S-adenosyl-methionine, from the cytoplasm to the Golgi was identified. Intriguingly, limulus lectin L6, a structurally related antibacterial protein of the Japanese horseshoe crab Tachypleus tridentatus, showed properties identical to the mushroom lectin. These results suggest that O-methylated glycans constitute a conserved target of the fungal and animal innate immune system. The broad phylogenetic distribution of O-methylated glycans increases the spectrum of potential antagonists recognized by Tectonins, rendering this conserved protein family a universal defense armor.