Safety needle device comprising: - a hub configured to be connected to a pen-injector, the hub comprising a lateral wall and an upper wall which define therebetween a cavity extending between the upper wall and an lower aperture able to receive the pen injector; - a needle attached to the hub, the needle extending along a longitudinal direction (X-X) between a distal end, configured for insertion into a patient, and an opposed proximal end configured to be connected to the pen injector, - a back-end shield slidable along the longitudinal direction (X-X) within the cavity of the hub and rotatable about the longitudinal direction (X-X), the back-end shield being movable irreversibly from an initial position, before connection of the pen injector to the hub, to a locking position, after removal of the pen injector to the hub passing through an intermediate position, - an elastic member arranged within the cavity and acting between the upper wall and the back-end shield to urge the back-end shield towards the proximal end of the needle along the longitudinal direction (X-X), - a locking arrangement comprising at least a first locking member formed on the back-end shield and at least a second locking member formed on the hub, the second locking member cooperating with the first locking member to guide the back-end shield from the initial position to the locking position and to lock the back-end shield in the locking position, - the second locking member comprises a passing through guide formed on the lateral wall of the hub; - the first locking member comprises a protrusion configured to engage the guide and to slide along the guide; characterised in that the passing through guide comprises: - a first stopping member configured to engage the protrusion in the initial position of the back-end shield to prevent longitudinal sliding of the back-end shield towards the proximal end of the needle; - a second stopping member configured to engage the protrusion in the locking position of the back-end shield to prevent longitudinal sliding of the back-end shield both towards the distal end and the proximal end of the needle. - a hub configured to be connected to a pen-injector, the hub comprising a lateral wall and an upper wall which define therebetween a cavity extending between the upper wall and an lower aperture able to receive the pen injector; - a needle attached to the hub, the needle extending along a longitudinal direction (X-X) between a distal end, configured for insertion into a patient, and an opposed proximal end configured to be connected to the pen injector, - a back-end shield slidable along the longitudinal direction (X-X) within the cavity of the hub and rotatable about the longitudinal direction (X-X), the back-end shield being movable irreversibly from an initial position, before connection of the pen injector to the hub, to a locking position, after removal of the pen injector to the hub passing through an intermediate position, - an elastic member arranged within the cavity and acting between the upper wall and the back-end shield to urge the back-end shield towards the proximal end of the needle along the longitudinal direction (X-X), - a locking arrangement comprising at least a first locking member formed on the back-end shield and at least a second locking member formed on the hub, the second locking member cooperating with the first locking member to guide the back-end shield from the initial position to the locking position and to lock the back-end shield in the locking position, - the second locking member comprises a passing through guide formed on the lateral wall of the hub; - the first locking member comprises a protrusion configured to engage the guide and to slide along the guide; - a first stopping member configured to engage the protrusion in the initial position of the back-end shield to prevent longitudinal sliding of the back-end shield towards the proximal end of the needle; - a second stopping member configured to engage the protrusion in the locking position of the back-end shield to prevent longitudinal sliding of the back-end shield both towards the distal end and the proximal end of the needle.