Long-lived plasma cells and memory B cells are the primary cellular components of long-term humoral immunity and as such are vitally important for the protection afforded by most vaccines. The SAP gene has been identified as the genetic locus responsible for X-linked lymphoproliferative disease, a fatal immunodeficiency. Mutations in SAP have also been identified in some cases of severe common variable immunodeficiency disease. The underlying cellular basis of this genetic disorder remains unclear. We have used a SAP knockout mouse model system to explore the role of SAP in immune responses. Here we report that mice lacking expression of SAP generate strong acute IgG antibody responses after viral infection, but show a near complete absence of virus-specific long-lived plasma cells and memory B cells, despite the presence of virus-specific memory CD4+ T cells. Adoptive transfer experiments show that SAP-deficient B cells are normal and the defect is in CD4+ T cells. Thus, SAP has a crucial role in CD4+ T-cell function: it is essential for late B-cell help and the development of long-term humoral immunity but is not required for early B-cell help and class switching.