Capsules protect bacteria against phagocytic clearance. Capsular polysaccharides or polyglutamates have evolved also to resist antigen presentation by immune cells, thereby interfering with the production of opsonophagocytic antibodies. Linking capsular material to a carrier protein stimulates its presentation to the immune system. For many conjugate vaccines this is achieved by a process of random chemical cross-linking. Here we describe a new technology, designated sortase-conjugation, which generates a single amide bond between the C-terminal end of a carrier protein and the capsular material. Sortase-conjugation was used to link the poly-D--glutamic acid (PDGA) capsule of Bacillus anthracis to the receptor binding domain (D4) of protective antigen (PagA). When used as a vaccine, PDGA-D4 conjugate elicited robust antibody responses against both capsule and D4. Immunization with PDGA-D4 afforded guinea pigs complete protection against anthrax challenge with wild-type or pagA mutant B. anthracis Ames.