The mode of action of the bacterial ter cluster and TelA genes, implicated in natural resistance to tellurite and other xenobiotic toxic compounds, pore-forming colicins and several bacteriophages has remained enigmatic for almost two decades. Using comparative genomics, sequence-profile searches and structural analysis we present evidence that the ter gene products and their functional partners constitute previously underappreciated, chemical stress response and anti-viral defense systems of bacteria. Based on contextual information from conserved gene neighborhoods and domain architectures, we show that the ter gene products and TelA lie at the center of membrane-linked metal recognition complexes with regulatory ramifications encompassing phosphorylation-dependent signal transduction, RNA-dependent regulation, biosynthesis of nucleoside-like metabolites and DNA processing. Our analysis suggests that the multiple metal-binding and non-binding TerD paralogs and TerC are likely to constitute a membrane-associated complex, which might also include TerB and TerY, and feature several, distinct metal-binding sites. Versions of the TerB domain might also bind small molecule ligands and link the TerD paralog-TerC complex to biosynthetic modules comprised of phosphoribosyltransferases (PRTases), ATP grasp amidoligases, TIM-barrel carbon-carbon lyases, and HAD phosphoesterases, which are predicted to synthesize novel nucleoside-like molecules. One of the PRTases is also likely to interact with RNA by means of its Pelota/Ribosomal protein L7AE-like domain. The von Willebrand factor A domain protein, TerY, is predicted to be part of a distinct phosphorylation switch, coupling a protein kinase and a PP2C phosphatase. We show, based on the evidence from numerous conserved gene neighborhoods and domain architectures, that both the TerB and TelA domains have been linked to diverse lipid-interaction domains, such as two novel PH-like and the Coq4 domains, in different bacteria and are likely to comprise membrane-associated sensory complexes that might additionally contain periplasmic binding-protein-II and OmpA domains. The TerD and TerB domains and the TerY-associated phosphorylation system are also functionally linked to distinct DNA-processing complexes, which contain proteins with SWI2/SNF2 and RecQ-like helicases, multiple AAA+ ATPases, McrC-N-terminal domain proteins, several restriction endonuclease fold DNases, DNA-binding domains and a type-VII/Esx-like system, which is at the center of a predicted DNA transfer apparatus. These DNA-processing modules and associated genes are predicted to be involved in restriction or suicidal action in response to phages and possibly repairing xenobiotic-induced DNA damage. In some eukaryotes, certain components of the ter system appear to have recruited to function in conjunction with the ubiquitin system and calcium-signaling pathways.