Modulation of pain signals in the spinal cord is achieved by fine-tuning the various positive and negative signals that control the interaction of the first-order neuron with the second-order neuron.[Steeds, 2016; Urch, 2007; Purves et al., 2018] Within the dorsal horn of the spinal cord, there are some projections from the brainstem that directly interact with neurons of the pain pathway, whereas other modulatory projections interact indirectly, via enkephalin-releasing local circuit neurons.[Purves et al., 2018; Yam et al., 2018; Diaz del Castillo et al., 2018]

References:
Diaz del Castillo M, Woldbye DPD, Heegaard AM. Neuropeptide Y and its involvement in chronic pain. Neuroscience 2018; 387: 162–169.

Purves D, Augustine GJ, Fitzpatrick D, et al. Neuroscience, 6th edition. New York, New York: Oxford University Press, 2018.

Steeds CE. The anatomy and physiology of pain. Surgery 2016; 34 (2): 55–59.

Urch C. Normal pain transmission. Rev Pain 2007; 1 (1): 2–6.

Yam MF, Loh YC, Tan CS, et al. General pathways of pain sensation and the major neurotransmitters involved in pain regulation. Int J Mol Sci 2018; 19 (8): E2164.