Answer: spinal cord
Step-by-step explanation:
In 1965,Ronald Melzack and Patrick Wall put forward a theory called "gate-control theory".
According to this theory,when a pain is generated at the injured site or tissues, the pain signals does not directly reach the brain.Before reaching the brain,the signals needs to encounter certain "neurological gates" at the spinal cord level and these gates determine whether the pain signals should reach to the brain or not.
Which means that pain is only percieved if these 'gates' gives way to the pain signals.