a | In the interference or defence phase of clustered, regularly interspaced short palindromic repeat (CRISPR) immunity, repeats and spacers are transcribed into a long precursor that is processed by a complex called CRISPR-associated complex for antiviral defence (Cascade) in Escherichia coli or CRISPR-associated 6 (Cas6) in Pyrococcus furiosus, which generates small CRISPR RNAs (crRNAs). Processing occurs near the 3′ end of the repeat sequence, leaving a short (~8 nucleotides) repeat sequence 5′ of the crRNA spacer. crRNAs have a more heterogeneous 3′ terminus that sometimes contains the palindromic sequence of the downstream repeat and has the potential to form a stem–loop structure. CRISPR loci transcription seems to be constitutive and the leader sequence may act as a promoter (arrow). CRISPRs are shown as white boxes, the leader sequence is shown as a black box, non-repetitive spacers are shown as coloured boxes and cas genes are shown as grey arrows. b | RNAs serve as guides for an effector complex, presumably composed of Cas proteins, that recognizes invading DNA and blocks infection (white cross) by an unknown mechanism.