During their production, single-walled carbon nanotubes form bundles. Owing to the weak van der Waals interaction that holds them together in the bundle, the tubes can easily slide on each other, resulting in a shear modulus comparable to that of graphite. This low shear modulus is also a major obstacle in the fabrication of macroscopic fibres composed of carbon nanotubes. Here, we have introduced stable links between neighbouring carbon nanotubes within bundles, using moderate electron-beam irradiation inside a transmission electron microscope. Concurrent measurements of the mechanical properties using an atomic force microscope show a 30-fold increase of the bending modulus, due to the formation of stable crosslinks that effectively eliminate sliding between the nanotubes. Crosslinks were modelled using first-principles calculations, showing that interstitial carbon atoms formed during irradiation in addition to carboxyl groups, can independently lead to bridge formation between neighbouring nanotubes.