Introduction Bacteria and archaea defend themselves against invasive DNA using adaptive immune systems comprising CRISPR (clustered regularly interspaced short palindromic repeats) loci and CRISPR-associated (Cas) genes. In association with Cas proteins, small CRISPR RNAs (crRNAs) guide the detection and cleavage of complementary DNA sequences. Type II CRISPR systems employ the RNA-guided endonuclease Cas9 to recognize and cleave double-stranded DNA (dsDNA) targets using conserved RuvC and HNH nuclease domains. Cas9-mediated cleavage is strictly dependent on the presence of a protospacer adjacent motif (PAM) in the target DNA. Recently, the biochemical properties of Cas9–guide RNA complexes have been harnessed for various genetic engineering applications and RNA-guided transcriptional control. Despite these ongoing successes, the structural basis for guide RNA recognition and DNA targeting by Cas9 is still unknown. Rationale To compare the architectures and domain organization of diverse Cas9 proteins, the atomic structures of Cas9 from Streptococcus pyogenes (SpyCas) and Actinomyces naeslundii (AnaCas9) were determined by x-ray crystallography. Crosslinking of target DNA containing 5-bromodeoxyuridines was conducted to identify PAM-interacting regions in SpyCas9. To test functional interactions with nucleic acid ligands, structure-based mutant SpyCas9 proteins were assayed for endonuclease activity with radiolabeled oligonucleotide dsDNA targets, and target DNA binding was monitored by electrophoretic mobility shift assays. To compare conformations of Cas9 in different states of nucleic acid binding, three-dimensional reconstructions of apo-SpyCas9, SpyCas9:RNA, and SpyCas9:RNA:DNA were obtained by negative-stain single-particle electron microscopy. Guide RNA and target DNA positions were determined with streptavidin labeling. Exonuclease protection assays were carried out to determine the extent of Cas9–target DNA interactions. Results The 2.6 Å–resolution structure of apo-SpyCas9 reveals a bilobed architecture comprising a nuclease domain lobe and an α-helical lobe. Both lobes contain conserved clefts that may function in nucleic acid binding. Photocrosslinking experiments show that the PAM in target DNA is engaged by two tryptophan-containing flexible loops, and mutations of both loops impair target DNA binding and cleavage. The 2.2 Å–resolution crystal structure of AnaCas9 reveals the conserved structural core shared by all Cas9 enzyme subtypes, and both SpyCas9 and AnaCas9 adopt autoinhibited conformations in their apo forms. The electron microscopic (EM) reconstructions of SpyCas9:RNA and SpyCas9:RNA:DNA complexes reveal that guide RNA binding results in a conformational rearrangement and formation of a central channel for target DNA binding. Site-specific labeling of guide RNA and target DNA define the orientations of nucleic acids in the target-bound complex. Conclusion The SpyCas9 and AnaCas9 structures define the molecular architecture of the Cas9 enzyme family in which a conserved structural core encompasses the two nuclease domains responsible for DNA cleavage, while structurally divergent regions, including the PAM recognition loops, are likely responsible for distinct guide RNA and PAM specificities. Cas9 enzymes adopt a catalytically inactive conformation in the apo state, necessitating structural activation for DNA recognition and cleavage. Our EM analysis shows that by triggering a conformational rearrangement in Cas9, the guide RNA acts as a critical determinant of target DNA binding.