Nature's high-performance polymer, spider silk, consists of specific proteins, spidroins, with repetitive segments flanked by conserved non-repetitive domains. Spidroins are stored as a highly concentrated fluid dope. On silk formation, intermolecular interactions between repeat regions are established that provide strength and elasticity. How spiders manage to avoid premature spidroin aggregation before self-assembly is not yet established. A pH drop to 6.3 along the spider's spinning apparatus, altered salt composition and shear forces are believed to trigger the conversion to solid silk, but no molecular details are known. Miniature spidroins consisting of a few repetitive spidroin segments capped by the carboxy-terminal domain form metre-long silk-like fibres irrespective of pH. We discovered that incorporation of the amino-terminal domain of major ampullate spidroin 1 from the dragline of the nursery web spider Euprosthenops australis (NT) into mini-spidroins enables immediate, charge-dependent self-assembly at pH values around 6.3, but delays aggregation above pH 7. The X-ray structure of NT, determined to 1.7 A resolution, shows a homodimer of dipolar, antiparallel five-helix bundle subunits that lack homologues. The overall dimeric structure and observed charge distribution of NT is expected to be conserved through spider evolution and in all types of spidroins. Our results indicate a relay-like mechanism through which the N-terminal domain regulates spidroin assembly by inhibiting precocious aggregation during storage, and accelerating and directing self-assembly as the pH is lowered along the spider's silk extrusion duct.