PROBLEM TO BE SOLVED: To provide a needle protector capable of releasing an operating state of a lock member of the needle protector and putting the lock member of the needle protector into the operating state by moving a tip of a syringe body part in and out of the needle protector.SOLUTION: A needle protector 1 includes lock members 35, 36, 45 and 48 that are provided between a needle hub 3 and a shield cylinder 4 so as to inhibit relative displacement. A release projection that is provided at a tip of a syringe body part entering the needle protector 1 releases an operating state of the lock members, and a needle 2 is shifted from a state of being shielded by the shield cylinder 4 to an exposing state. Moreover, when the syringe body part is moved backward, a spring 5 moves the needle hub 3 within the shield cylinder 4, the needle 2 is shifted from the exposing state to the state of being shielded by the shield cylinder and then the lock members are put into the operating state.SELECTED DRAWING: Figure 3