This reaction is similar to the one of yanking your hand back when you touch something burning hot. When this happens do you consciously think about pulling your hand back? The answer is no. Before the sense of pain reaches to your brain your spinal cord sends a message lightning fast to your muscles to move. Your body automatically does this to protect you from further harm, even before you feel the pain (although a split second after you will feel the pain and again be in control). This concept is the exact same in the situation of the question. This means that Nervous and muscular systems are working together to accomplish this.
Hope this helped!
~Just a girl in love with Shawn Mendes