Each antibody-producing B cell makes antibodies of unique specificity, reflecting a series of ordered gene rearrangements which must be successfully performed if the cell is to survive. A second selection process occurs during immune responses in which a new antibody repertoire is generated through somatic hypermutation. Here only mutants binding antigen with high affinity survive to become memory cells. Cells expressing autoreactive receptors are counter-selected at both stages. This stringent positive and negative selection allows the generation and diversification of cells while rigorously controlling their specificity.