The needle protection device comprises: a protector support (20), defining an introduction duct for a syringe body, a needle protector (22) which may be displaced relative to the protector support (20), between a retracted position and a deployed position, a compression spring (24), applied between the protector support (20) and the needle protector (22) and initial retaining means (38, 40, 54) for the needle protector (22) against the force of the compressed spring (24), said means (38, 40, 54) being released by displacement of the needle protector (22) in a release direction with relation to the protector support (20). The device further comprises mechanical locking means (56) for the needle protector (22) with relation to the protector support (20) in the release direction in the absence of a syringe body in the protector support duct and said mechanical locking means (56) may be deactivated by engaging a syringe body in the duct on the protector support (20).