In organic synthesis, the composition and structure of products are predetermined by the reaction conditions; however, the synthesis of well-defined inorganic nanostructures often presents a significant challenge yielding non-stoichiometric or polymorphic products. In this study, confinement in the nanoscale cavities of single-walled carbon nanotubes (SWNT) provides a new approach for multi-step inorganic synthesis where sequential chemical transformations take place within the same nanotube. In the first step, SWNT donate electrons to the reactant iodine molecules (I2) transforming them to iodide anions (I -). These then react with metal hexacarbonyls (M(CO)6, M = Mo or W) in the next step yielding anionic nanoclusters [M6I14] 2-, the size and composition of which are strictly dictated by the nanotube cavity, as demonstrated by aberration corrected high resolution transmission electron microscopy (AC-HRTEM), scanning transmission electron microscopy (STEM) and energy dispersive X-ray (EDX) spectroscopy. Atoms in the nanoclusters [M6I14] 2-are arranged in a perfect octahedral geometry and can engage in further chemical reactions within the nanotube, either reacting with each other leading to a new polymeric phase of molybdenum iodide [Mo6I12]n, or with hydrogen sulphide gas giving rise to nanoribbons of molybdenum/tungsten disulphide [MS2]n in the third step of the synthesis. Electron microscopy measurements demonstrate that the products of the multi-step inorganic transformations are precisely controlled by the SWNT nanoreactor, with complementary Raman spectroscopy revealing the remarkable property of SWNT to act as a reservoir of electrons during the chemical transformation. The electron transfer from the hostnanotube to the reacting guest-molecules is essential for stabilising the anionic metal iodide 2 nanoclusters and for their further transformation to metal disulphide nanoribbons synthesised in the nanotubes in high yield.Keywords: Carbon Nanotube, Charge Transfer, Nanoparticle, Nanoreactor, Nanoribbon Single-walled carbon nanotubes (SWNT) are among the most effective and universal containers for molecules. Provided that the internal diameter of the host-nanotube is wider than the critical diameter of the guest-molecule, the insertion of molecules into SWNT is spontaneous and, in some cases, such as fullerenes and their derivatives, irreversible due to the ubiquitous van der Waals forces dominating the host guest interactions between the nanotube and molecules [1]. Fullerenes [2,3] or organic molecules [4][5][6][7][8][9][10] encapsulated in SWNT can then be triggered to react inside the nanotube to form unusual oligomers and polymers [11][12][13], graphene nanoribbons [14][15][16], nanotubes [8,17] or extraordinary molecular nanodiamonds [9]. These examples clearly demonstrate the use of SWNT as nanoscale chemical reactors, where the structure of the macromolecular product can be precisely controlled by spatial confinement of the reactions in the nanotube channel.In contrast to organic molecules,...