Background: Intermittent theta burst stimulation (iTBS) of the primary motor cortex improves transiently lower limbs spasticity in multiple sclerosis (MS). However, the cerebral mechanisms underlying this effect have never been investigated. Objective: To assess whether modulation of spasticity induced by iTBS is underlined by functional reorganization of the primary motor cortices. Methods: A total of 17 patients with MS suffering from lower limbs spasticity were randomized to receive real iTBS or sham iTBS during the first half of a 5-week indoor rehabilitation programme. Spasticity was assessed using the Modified Ashworth Scale and the Visual Analogue Scale at baseline, after the stimulation session and at the end of the rehabilitation programme. Resting-state functional magnetic resonance imaging (fMRI) was performed at the three time points, and brain functional networks topology was analysed using graph-theoretical approach. Results: At the end of stimulation, improvement of spasticity was greater in real iTBS group than in sham iTBS group (p=0.026). iTBS had a significant effect on the balance of the connectivity degree between the stimulated and the homologous primary motor cortex (p=0.005). Changes in inter-hemispheric balance were correlated with improvement of spasticity (rho=0.56, p=0.015). Conclusion: This longitudinal resting-state fMRI study evidences that functional reorganization of the primary motor cortices may underlie the effect of iTBS on spasticity in MS.