A method is provided, including identifying a subject as suffering from pain in a first limb of the subject. In response to the identifying, treatment of the pain in the first limb is facilitated by implanting electrodes in a limb of the subject that is contralateral to the first limb. Other embodiments are also described.