Described is a needle safety device comprising a needle hub, a needle coupled to the needle hub and having a distal tip a needle shield telescopically coupled to the needle hub, the needle shield, a locking element including latch arms adapted to engage the needle hub and engagement elements adapted to engage the needle shield. When the needle shield is in a first axial position (PA1) relative to the needle hub, the needle shield covers the distal tip of the needle and the engagement elements of the locking element engage the needle shield. When the needle shield is in a second axial position (PA2) relative to the needle hub, the needle shield is retracted to expose the distal tip of the needle and the latch arms engage the needle hub. When the needle shield is in a third axial position (PA3) relative to the needle hub, the needle shield covers the distal tip of the needle and the engagement elements abut the needle shield to prevent proximal movement of the needle shield relative to the needle hub.