Functional MRI (fMRI) can detect changes from resting levels of blood flow and oxygenation during task performance (i.e. activation). We used a simple electrical nerve stimulation technique together with fMRI to study pain process in the human cortex. Images of the primary somatosensory (SI) and cingulate cortex (Cg) were obtained from subjects during stimulation at painful and non-painful intensities. Stimuli that evoked non-painful tingling sensations activated the contralateral SI but not Cg. Stimuli that evoked painful sensations activated both the contralateral SI and Cg. These data indicate that fMRI can detect pain-related changes in SI and Cg evoked by electrical stimulation of peripheral nerves. These findings add to the evidence for a role of SI and Cg in human pain processes and provide a simple method of stimulus delivery for its study.