The act of scraping nails down a chalkboard creates a sound so awful that most people have an instantaneous reaction: A shiver runs up the spine, and they slap their hands over their ears. Anything to block out that noise! But why do unpleasant sounds affect us like this?

Newcastle University scientists think they’ve pinpointed why. For a new study , the researchers placed 13 subjects inside functional Magnetic Resonance Imaging (fMRI) machines, which measure brain activity by detecting changes in blood flow. As they played a range of 74 sounds, the scientists watched what happened in the brain.

They found we recoil from unpleasant sounds because of the interaction between two areas of the brain: The auditory cortex, which processes sound, and the amygdala, which is active when we process negative emotions. So when someone screams, or a baby cries, the amygdala takes over, heightening the activity in the auditory complex and creating a negative reaction. This activity is not as heightened when listening to a soothing sound.

Based on acoustic analysis, the scientists determined that all sounds from 2000 to 5000 Hertz were unpleasant to the subjects of the study. They hope that a better understanding of how the brain reacts to noise will help people sensitive to loud sounds, like those with some forms of autism, and people who suffer from tinnitus and migraines.

But perhaps the most surprising thing to come out of this study is that the subjects rated nails on a chalkboard the fifth most irritating sound—knife on a bottle, fork on a glass, chalk on a blackboard and ruler on a bottle all come before it.