The formation of a P pilus requires a molecular chaperone in the periplasm and a molecular usher in the outer membrane. Each pilus is composed of six different types of proteins that are assembled into a composite fiber in a defined order. The correct folding of subunits into domains that can serve as assembly modules requires an association with the periplasmic chaperone. PapD is the prototype member of the family of bacterial pilus chaperones that have a three-dimensional structure consistent with an immunoglobulin fold. In general, proteins with an immunoglobulin fold structure have molecular recognition functions in eukaryotic cells that are often integrated with effector functions. PapD has also a recognition function, binding nascently translocated pilus subunits and maintaining them in assembly-competent conformations. The association of the chaperone with the subunit triggers the targeting of the latter to an outer membrane usher. The usher serves as a molecular gatekeeper, allowing the ordered incorporation of the pilus subunits into the pilus structure from the periplasmic chaperone complexes. The two immunoglobulin-like domains of PapD are oriented to form a cleft that contains the subunit binding site. This is a different binding paradigm from that used by either antibodies or the growth hormone receptor. The blend of genetics, biochemistry, X-ray crystallography, and carbohydrate chemistry in the study of pili biogenesis will continue to give insight into some of the most basic intellectual challenges in molecular biology concerning how proteins fold into domains that serve as modules for the formation of larger assemblies, and relating these processes to microbial pathogenesis.