The chaperone-usher (CU) pathway assembles organelles termed pili or fimbriae in Gram-negative bacteria. Type 1 pili expressed by uropathogenic Escherichia coli are prototypical structures assembled by the CU pathway. Biogenesis of pili by the CU pathway requires a periplasmic chaperone and an outer-membrane protein termed the usher (FimD). We show that the FimD C-terminal domains provide the high-affinity substrate-binding site but that these domains are masked in the resting usher. Domain masking requires the FimD plug domain, which serves as a switch controlling usher activation. We demonstrate that usher molecules can act in trans for pilus biogenesis, providing conclusive evidence for a functional usher oligomer. These results reveal mechanisms by which molecular machines such as the usher regulate and harness protein-protein interactions and suggest that ushers may interact in a cooperative manner during pilus assembly in bacteria.