Safety pen needle device comprising - a generally tubular hub (10; 80) having a proximal and a distal end, said hub comprising attachment means (14; 82) arranged at its distal end for attaching the safety pen needle device to a medicament container assembly, and a coaxially arranged needle attachment member (20; 88); - an injection needle (26; 90) having an injection end (28; 92) and a non injection end (35; 94), said injection needle being attached inside said hub and extending through the needle attachment member; characterised in that said device further comprises - a generally tubular rotatable sleeve (30; 91) rotatable arranged on said hub, said rotatable sleeve comprising on its outer circumferential surface at least one guide track (46; 98) comprising flexible means (58; 100,108); - a generally tubular needle shield (64; 112) slidably arranged on said rotatable sleeve, said needle shield comprising at least one guide protrusion (74; 120) on its inner circumferential surface, wherein said at least one protrusion is arranged to interact with said at least one guide track and with said flexible means, and wherein the at least one guide track (46; 98) comprises at least one inclined section (50; 103), such that when the needle shield is linearly displaced on the rotatable sleeve and said at least one guide protrusion (74, 120) passes through the at least one inclined section (50; 103), the rotatable sleeve is forced to rotate on the hub (10; 80); and - resilient means (70; 116) co-acting with said needle shield for urging said needle towards the distal end of the device; wherein the interaction between the at least one guide protrusion and the flexible means (58; 100,108) locks said needle shield to the rotatable sleeve when the device has been used. - a generally tubular hub (10; 80) having a proximal and a distal end, said hub comprising attachment means (14; 82) arranged at its distal end for attaching the safety pen needle device to a medicament container assembly, and a coaxially arranged needle attachment member (20; 88); - an injection needle (26; 90) having an injection end (28; 92) and a non injection end (35; 94), said injection needle being attached inside said hub and extending through the needle attachment member; characterised in that said device further comprises - a generally tubular rotatable sleeve (30; 91) rotatable arranged on said hub, said rotatable sleeve comprising on its outer circumferential surface at least one guide track (46; 98) comprising flexible means (58; 100,108); - a generally tubular needle shield (64; 112) slidably arranged on said rotatable sleeve, said needle shield comprising at least one guide protrusion (74; 120) on its inner circumferential surface, wherein said at least one protrusion is arranged to interact with said at least one guide track and with said flexible means, and wherein the at least one guide track (46; 98) comprises at least one inclined section (50; 103), such that when the needle shield is linearly displaced on the rotatable sleeve and said at least one guide protrusion (74, 120) passes through the at least one inclined section (50; 103), the rotatable sleeve is forced to rotate on the hub (10; 80); and - resilient means (70; 116) co-acting with said needle shield for urging said needle towards the distal end of the device; wherein the interaction between the at least one guide protrusion and the flexible means (58; 100,108) locks said needle shield to the rotatable sleeve when the device has been used.