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