The requirements for B7 costimulation during an in vivo humoral response to an intact extracellular bacteria have not been reported. In this study we immunized mice with Streptococcus pneumoniae (R36A) to determine the B7 requirements for induction of Ig, specific for two determinants on R36A, the phosphorylcholine (PC) determinant of C-polysaccharide and pneumococcal surface protein A (PspA). We show that the primary anti-PspA response, the development of PspA-specific memory, and the induction of the secondary anti-PspA response in primed mice were completely dependent upon B7 costimulation. Of note, costimulation was required only briefly after the secondary immunization compared with after the primary immunization for optimal induction of Ig. Blockade of B7 costimulation at the time of secondary immunization also completely abrogated the established state of memory, but did not induce tolerance. In contrast to the anti-PspA response, the primary anti-PC response involved only a very short period of B7 costimulation. Whereas B7-2 alone was required for induction of the primary anti-PspA and anti-PC responses, a redundant role for B7-1 and B7-2 was noted for the PspA-specific secondary response. CTLA4Ig blocked both the anti-PC and anti-PspA responses equally well over a wide range of bacterial doses. These studies demonstrate a critical, but variable, role for B7-dependent costimulation during an Ig response to an extracellular bacteria.