Sammanfattning: Recent studies indicate that experience dependent mechanisms shape the pain system during the development. In view of that painful stimuli are rare during development it is not clear how this is accomplished. In this thesis it is confirmed, using a battery of sensory deprivations in the rat, that the development of an essential component of the pain system, the nociceptive withdrawal reflexes (NWR), is subject to experience dependent learning. Moreover, the learning in the NWR occurs despite absence of nociceptive stimuli. Instead it requires tactile experience. This novel ‘cross-modality learning’ occurs within a particular time window during development, normally lasting 5-7 days, after which the central connections are stabilized. A correlation between the cross modality learning and spontaneous movements was established. The spontaneous tail movements, studied during the postnatal days 1-25, were found to be generated in the spinal cord. They peak postnatally, preced and overlap in time the functional adaptation of NWR. The NWR adaptation occurs simultaneously with a qualitative change in spontaneous movements (towards simple uni-directional movements), presumably reflecting a maturation of spinal reflex circuits connections. It is proposed that an unsupervised correlation-based learning mechanism, using spontaneous muscle twitches, account for the functional adaptation of the NWR system. In this learning mechanism, spontaneously active reflex interneurones cause movements that in turn lead to altered sensory feedback informing about the consequencies of the movements, which is used to set the gain in the nociceptive connections. A simulation of this new learning mechanism, termed Motor Directed Somatosensory Imprinting (MDSI), showed that it is plausible. In behavioural experiments, it was demonstrated that tactile feedback resulting from spontaneous muscle twitches during sleep(Blumberg and Lucas, 1996b;Blumberg and Lucas, 1994a) indeed modifies the sensorimotor transformation in young rats in the predicted manner. These findings thus indicate that spontaneous movements, corresponding to human foetal movements, play a key role for establishing functional nociceptive networks. This learning occurs during a sleep state called active sleep, which is similar to REM sleep in adults, indicating a novel role for sleep in learning and memory.