To clarify if an adaptive current stimulation protocol, in which current amplitude is modulated during continuous stimulation, provides better efficacy than constant current stimulation protocol with respect to analgesia caused by individualized stimulation in rat periaqueductal gray matter (PAG)/dorsal raphe nuclei (DRN). Approach. Ultrathin microelectrodes adapted for recording (n=6) and stimulation (n=16) were implanted in rat primary somatosensory cortex and PAG/DRN, respectively. In each animal included (n=12), a subset of PAG/DRN microelectrodes (n=1-3 per animal) was selected that on simultaneous stimulation blocked nociceptive withdrawal reflexes in awake unrestrained animals without noticeable side effects. Analgesic effects were subsequently assessed from both nociceptive withdrawal reflexes and intracortical pain-related responses on CO2 laser hindpaw stimulation. The analgesic effects of adaptive current PAG/DRN stimulation comprising incremental increases of 5µA/microelectrode (initial median current 30µA/microelectrode) when effects declined were compared to the effects of constant current stimulation. Behavioral effects and brain state related changes were analyzed using quantitative movement analysis and electrocorticography (ECoG, recorded on top of the dura mater), respectively. Tissue reactions and probe placement in PAG/DRN were assessed with immunohistochemistry. Main results. Powerful and sustained (4 hours) analgesia was achieved with the adaptive current protocol within a rather wide area of PAG/DRN. Analgesic after-effects were seen for up to 30 min. Behavioral and brain state related side effects were minimal. Moreover, 6 weeks after implantation, there were no traces of bleedings, only small glial reactions and small but not statistically significant loss of neurons nearby indicating that the 6 microelectrode stimulation employed is biocompatible. Significance. The results indicate that sustained and powerful analgesia with minimal side effects can be achieved by granular and individualized stimulation in PAG/DRN using an adaptive current stimulation protocol. This microelectrode technology and stimulation 10 paradigm thus has the potential of providing a highly efficient and safe pain therapy.