This experiment is intended to compare both the clinical effects and the brain correlates of a BCI based self modulation of M1 activity and of exogenous magnetic brain stimulation in a population of patients suffering from chronic neuropathic pain of an upper limb. 15 such patients will receive a course of 10 daily magnetic stimulation sessions with stimulation of M1 as described in the literature. A further 30 patients will be divided into two groups: 15 will perform a course of 10 real BCI neurofeedback sessions modulating motor cortex activity and 15 will perform a course of 10 sham neurofeedback sessions. The participants' baseline chronic pain levels and their response to acute painful stimuli will be clinically evaluated before and after the course, and for an additional 1 month. Furthermore, before and after the course patients will be scanned using functional MRI during rest (baseline pain levels) and during acute pain. These scans are performed both to describe the neural correlates of the analgesia induced by motor cortex magnetic stimulation , and to compare the observed networks to the network effect of a BCI neurofeedback modulation of motor cortex activity.