(a) V(D)J recombination is initiated when the RAG1 and RAG2 proteins bind to specific recognition sequences (triangles) that flank the Ig or T cell receptor gene segments (rectangles, here denoted V and J). The RAG proteins act in concert to cleave the DNA precisely between the specific recognition sequences and the coding segments, producing blunt signal ends and covalently sealed (hairpinned) coding ends. The latter must be opened by endonucleolytic cleavage before forming the coding joint (the rearranged antigen-receptor gene). RAG1/RAG2 and NHEJ factors (listed in the center of the figure) are required for forming both coding and signal joints; DNA-PKcs and Artemis have special roles in creating coding joints, although DNA-PKcs–deficient cells show some abnormal signal joints and a mild decrease in signal joint formation as well. (b) Hairpin opening requires several factors, including Artemis, DNA-PKcs, and possibly the RAG proteins. The hairpins are nicked near the terminus, generating short single-strand extensions; terminal deoxynucleotidyl transferase (TdT) can be recruited to the site to insert N nucleotides, creating added junctional diversity.