Covalent chemistry typically occurs randomly on the graphene lattice of a carbon nanotube because electrons are delocalized over thousands of atomic sites, and rapidly destroys the electrical and optical properties of the nanotube. Here we show that the Billups-Birch reductive alkylation, a variant of the nearly century-old Birch reduction, occurs on single-walled carbon nanotubes by defect activation and propagates exclusively from sp 3 defect sites, with an estimated probability more than 1,300 times higher than otherwise random bonding to the 'π-electron sea'. This mechanism quickly leads to confinement of the reaction fronts in the tubular direction. The confinement gives rise to a series of interesting phenomena, including clustered distributions of the functional groups and a constant propagation rate of 18 ± 6 nm per reaction cycle that allows straightforward control of the spatial pattern of functional groups on the nanometre length scale.