P pili are hair-like adhesive structures that are assembled on the outer membrane (OM) of uropathogenic Escherichia coli by the chaperone-usher pathway. In this pathway, chaperone-subunit complexes are formed in the periplasm and targeted to an OM assembly platform, the usher. Pilus subunits display a large groove caused by a missing β-strand which, in the chaperone-subunit complex, is provided by the chaperone. At the usher, pilus subunits are assembled in a mechanism termed "donor-strand exchange (DSE)" whereby the β-strand provided by the chaperone is exchanged by the incoming subunit's N-terminal extension (Nte). This occurs in a zip-in-zip-out fashion, starting with a defined residue, P5, in the Nte inserting into a defined site in the groove, the P5 pocket. Here, electrospray ionization-mass spectrometry (ESI-MS) has been used to measure DSE rates in vitro. Second order rate constants between the chaperone-subunit complex and a range of Nte peptides substituted at different residues confirmed the importance of the P5 residue of the Nte in determining the rate of DSE. In addition, residues either side of the P5 residue (P5 + 1 and P5 - 1), the side-chains of which are directed away from the subunit groove, also modulate the rates of DSE, most likely by aiding the docking of the Nte into the P5 pocket on the accepting subunit prior to DSE. The ESI-MS approach developed is applicable to the measurement of rates of DSE in pilus biogenesis in general and demonstrates the scope of ESI-MS in determining biomolecular processes in molecular detail.