Periplasmic chaperones direct the assembly of adhesive, multi-subunit pilus fibers that play critical roles in bacterial pathogenesis. Pilus assembly occurs via a donor strand exchange mechanism in which the N-terminal extension of one subunit replaces the chaperone G1 strand that transiently occupies a groove in the neighboring subunit. Here, we show that the chaperone primes the subunit for assembly by holding the groove in an open, activated conformation. During donor strand exchange, the subunit undergoes a topological transition that triggers the closure of the groove and seals the N-terminal extension in place. It is this topological transition, made possible only by the priming action of the chaperone that drives subunit assembly into the fiber.