Corynebacterium diphtheriae SpaA pili are composed of three pilin subunits, SpaA, SpaB and SpaC. SpaA, the major pilin protein, is distributed uniformly along the pilus shaft, whereas SpaB is observed at regular intervals, and SpaC seems to be positioned at the pilus tip. Pilus assembly in C. diphtheriae requires the pilin motif and the C-terminal sorting signal of SpaA, and is proposed to occur by a mechanism of ordered cross-linking, whereby pilin-specific sortase enzymes cleave precursor proteins at sorting signals and involve the side-chain amino groups of pilin motif sequences to generate covalent linkages between pilin subunits. We show here that two elements of SpaA pilin precursor, the pilin motif and the sorting signal, are together sufficient to promote the polymerization of an otherwise secreted protein by a process requiring the function of the sortase A gene (srtA). Five other sortase genes are dispensable for SpaA pilus assembly. Further, the incorporation of SpaB into SpaA pili requires a glutamic acid residue within the E box motif of SpaA, a feature that is found to be conserved in other Gram-positive pathogens that encode sortase and pilin subunit genes with sorting signals and pilin motifs. When the main fimbrial subunit of Actinomyces naeslundii type I fimbriae, FimA, is expressed in corynebacteria, C. diphtheriae strain NCTC13129 polymerized FimA to form short fibres. Although C. diphtheriae does not depend on other actinomycetal genes for FimA polymerization, this process involves the pilin motif and the sorting signal of FimA as well as corynebacterial sortase D (SrtD). Thus, pilus assembly in Gram-positive bacteria seems to occur by a universal mechanism of ordered cross-linking of precursor proteins, the multiple conserved features of which are recognized by designated sortase enzymes.