Pili are surface-linked virulence factors that play key roles in infection establishment in a variety of pathogenic species. In Gram-positive pathogens, pilus formation requires the action of sortases, dedicated transpeptidases that covalently associate pilus building blocks. In Streptococcus pneumoniae, a major human pathogen, all genes required for pilus formation are harbored in a single pathogenicity islet which encodes three structural proteins (RrgA, RrgB, RrgC) and three sortases (SrtC-1, SrtC-2, SrtC-3). RrgB forms the backbone of the streptococcal pilus, to which minor pilins RrgA and RrgC are covalently associated. SrtC-1 is the main sortase involved in polymerization of the RrgB fiber and displays a lid which encapsulates the active site, a feature present in all pilus-related sortases. In this work, we show that catalysis by SrtC-1 proceeds through a catalytic triad constituted of His, Arg, and Cys and that lid instability affects protein fold and catalysis. In addition, we show by thermal shift analysis that lid flexibility can be stabilized by the addition of substrate-like peptides, a feature shared by other periplasmic transpeptidases. We also report the characterization of a trapped acyl-enzyme intermediate formed between SrtC-1 and RrgB. The presence of lid-encapsulated sortases in the pilus biogenesis systems in many Gram-positive pathogens points to a common mechanism of substrate recognition and catalysis that should be taken into consideration in the development of sortase inhibitors.