According to the invention a safety device (1) for a pre filled syringe (2) with an injection needle (2.1) comprises a support body (1.2) adapted to mount the pre filled syringe (2) a needle shield (1.1) slidably arranged with respect to the support body (1.2) a retention and locking means (M) for retaining and locking the needle shield (1.1) with respect to the support body (1.2) in a first and a second advanced position (PA1 PA2) and in a retracted position (PR). The needle shield (1.1) comprises an annular flange (1.1.1) adapted to rest on the skin of the patient receiving an injection. The retention and locking means (M) are arranged at a distal end of the safety device (1).