Described is a needle safety device comprising a needle hub including a plurality of resilient arms having detents, a needle having a distal tip, and a needle shield telescopically coupled to the needle hub. The needle shield includes a plurality of axial slots adapted to engage the detents on the resilient arms and the detents are axially movable in the slots. The needle shield includes a plurality of grooves separated from the slots by separation walls and the grooves are adapted to engage the detents. When the needle shield is in a first position relative to the needle hub, the needle shield covers the distal tip of the needle and the detents are engaged in the slots. When the needle shield is in a second position relative to the needle hub, the distal tip of the needle protrudes through an aperture in the needle shield and the detents are engaged in the slots. When the needle shield is in a third position relative to the needle hub, the needle shield covers the distal tip of the needle and the detents are engaged in the grooves. In the third position, the detents are adapted to abut the separation walls and prevent proximal movement of the needle shield relative to the needle hub.