Sortase enzymes are responsible for covalent anchoring of specific proteins to the peptidoglycan of the cell wall of gram-positive bacteria. In some gram-positive bacteria (e.g. Staphylococcus aureus), sortases have been found to be essential for pathogenesis and their inhibitors are under development as potential novel therapeutics. Here we provide the first report on the structural characterisation of the C. difficile sortase. An active site mutant was crystallised and its structure determined to 2.55 Å by X-ray diffraction to provide structural insight into its catalytic mechanism. In order to elucidate the role of the sortase in the cell wall biogenesis, a C. difficile sortase knockout strain was constructed by intron mutagenesis. Characterisation of this mutant led to the discovery that the putative adhesin CD0386 is anchored to the peptidoglycan of C. difficile by the sortase SrtB and that an SPKTG peptide motif is involved in the transpeptidation reaction with the C. difficile peptidoglycan. In an animal model for C. difficile infection, the SrtB mutant caused disease at a similar rate of onset as the wild type strain. In conclusion, our detailed study shows that the SrtB enzyme from C. difficile does not play an essential role in pathogenesis.