Somatic hypermutation introduces point mutations into immunoglobulin genes in germinal centre B cells during an immune response. The reaction is initiated by cytosine deamination by the activation-induced deaminase (AID) and completed by error-prone processing of the resulting uracils by mismatch and base excision repair factors. Somatic hypermutation represents a threat to genome integrity and it is not known how the B cell genome is protected from the mutagenic effects of somatic hypermutation nor how often these protective mechanisms fail. Here we show, by extensive sequencing of murine B cell genes, that the genome is protected by two distinct mechanisms: selective targeting of AID and gene-specific, high-fidelity repair of AID-generated uracils. Numerous genes linked to B cell tumorigenesis, including Myc, Pim1, Pax5, Ocab (also called Pou2af1), H2afx, Rhoh and Ebf1, are deaminated by AID but escape acquisition of most mutations through the combined action of mismatch and base excision repair. However, approximately 25% of expressed genes analysed were not fully protected by either mechanism and accumulated mutations in germinal centre B cells. Our results demonstrate that AID acts broadly on the genome, with the ultimate distribution of mutations determined by a balance between high-fidelity and error-prone DNA repair.