The widespread bacterial second messenger cyclic diguanylate (c-di-GMP) regulates a 1 variety of processes, including protein secretion, motility, cell development, and biofilm 2 formation. C-di-GMP-dependent responses are often mediated by its binding to the 3 cytoplasmic receptors that contain the PilZ domain. We present here comparative 4 structural and sequence analysis of various PilZ-related domains and describe three 5 principal types of them: (i) the canonical PilZ domain, whose structure includes a six-6 stranded beta-barrel and a C-terminal alpha-helix; (ii) an atypical PilZ domain that 7 contains two extra alpha-helices and forms stable tetramers, and (iii) divergent PilZ-8 related domains, which include the eponymous PilZ protein and PilZN (YcgR_N) and 9 PilZNR (YcgR_2) domains. We refine the second c-di-GMP binding motif of PilZ as 10 [D/N]hSxxG and show that the hydrophobic residue h of this motif interacts with a cluster 11 of conserved hydrophobic residues, helping maintain the PilZ domain fold. We describe 12 several novel PilZN-type domains that are fused to the canonical PilZ domains in specific 13 taxa, such as spirochetes, actinobacteria, cellulosolytic clostridia, deltaproteobacteria, 14 and aquificae. We propose that the evolution of three major groups of PilZ domains 15 included (i) fusion of pilZ with other genes, which produced Alg44, cellulose synthase, and 16 other multidomain proteins; (ii) insertion of a ~200-bp fragment, which resulted in the 17 formation of tetramer-forming PilZ proteins, and (iii) tandem duplication of pilZ genes, 18 which led to the formation of PilZ dimers and YcgR-like proteins. 19 IMPORTANCE 20Cyclic di-GMP is a ubiquitous bacterial second messenger that regulates motility, biofilm 21 formation and virulence of many bacterial pathogens. The PilZ domain is a widespread c-22 di-GMP receptor that binds c-di-GMP through its RxxxR and [D/N]xSxxG motifs; some PilZ 23 domains lack these motifs and are unable to bind c-di-GMP. We used structural and 24 sequence analysis to assess the diversity of PilZ-related domains and define their common 25 features. We show that the hydrophobic residue h in the second motif is highly conserved; 26 it may serve as a readout for c-di-GMP binding. We describe three principal classes of 27 PilZ-related domains: canonical, tetramer-forming, and divergent PilZ domains, and 28 propose the evolutionary pathways that led to the emergence of these PilZ types. 29 30