A device for injection of a product into an injection site, the product being carried by a container having an open proximal end and a substantially closed distal end carrying a needle to provide an outlet port for the product from the container, and a piston provided in the container and movable with respect to the container, the movement of the piston causing the product to be expelled from the container through the needle, said device comprising: - a housing receiving at least partly said container, said container being movable relative to said housing between an initial position, in which a tip of the needle does not extend beyond a distal end of said housing and an insertion position, distally spaced relative to said initial position, and in which the tip of the needle extends beyond said distal end of said housing, - a needle shield releasably coupled with said container, for protecting said needle prior to use of the device, said device being characterized in that it further comprises: - retaining means (13, 14, 17) provided at or near said distal end of said device, designed for preventing said container to move distally with respect to said housing until said needle shield is removed from said container, - said retaining means comprising at least one flexible element, said flexible element being capable of deflecting from a stressed position, in which said flexible element prevents said container to move distally with respect to said housing, to a released position, in which said flexible element does not prevent said container to move distally with respect to said housing, removal of said needle shield from said container causing said flexible element to go from its stressed position to its released position, - said needle shield comprising a pushing surface, said pushing surface being in contact with said flexible element prior to removal of said needle shield from said container, said pushing surface thereby forcing said flexible element in its stressed position prior to removal of said needle shield, - said flexible element having a fixed part attached directly or indirectly to said container and a free part provided with a peg, said retaining means further comprising a recess located on a part coupled to said housing, said peg being engaged into said recess when said flexible element is in its stressed position, said peg being disengaged from said recess when said flexible element is in its released position, - said device further comprises a safety shield for protecting the needle before and after use, said safety shield receiving said container and being received within said housing, said safety shield being coupled to said housing at least when said container is in its initial position, the recess of said retaining means being located on an inner wall of said safety shield. - a housing receiving at least partly said container, said container being movable relative to said housing between an initial position, in which a tip of the needle does not extend beyond a distal end of said housing and an insertion position, distally spaced relative to said initial position, and in which the tip of the needle extends beyond said distal end of said housing, - a needle shield releasably coupled with said container, for protecting said needle prior to use of the device, - retaining means (13, 14, 17) provided at or near said distal end of said device, designed for preventing said container to move distally with respect to said housing until said needle shield is removed from said container, - said retaining means comprising at least one flexible element, said flexible element being capable of deflecting from a stressed position, in which said flexible element prevents said container to move distally with respect to said housing, to a released position, in which said flexible element does not prevent said container to move distally with respect to said housing, removal of said needle shield from said container causing said flexible element to go from its stressed position to its released position, - said needle shield comprising a pushing surface, said pushing surface being in contact with said flexible element prior to removal of said needle shield from said container, said pushing surface thereby forcing said flexible element in its stressed position prior to removal of said needle shield, - said flexible element having a fixed part attached directly or indirectly to said container and a free part provided with a peg, said retaining means further comprising a recess located on a part coupled to said housing, said peg being engaged into said recess when said flexible element is in its stressed position, said peg being disengaged from said recess when said flexible element is in its released position, - said device further comprises a safety shield for protecting the needle before and after use, said safety shield receiving said container and being received within said housing, said safety shield being coupled to said housing at least when said container is in its initial position, the recess of said retaining means being located on an inner wall of said safety shield.