An automatic injector, comprising: - a cap, extending along a longitudinal axis, - a syringe for injecting a medicament, which is positioned inside the cap and which includes a needle, a needle protector, a body and a piston, - a rod for pushing the piston inside the syringe body, which is moved axially forward by a resilient load force exerted by a first spring, during an injection, - an end-piece for protecting the needle, which is movable axially around the needle and against a resilient load force exerted by a second spring, between a forward position (figure 2; figure 13) where it surrounds the needle and a withdrawn position (figure 8; figure 14), where the needle is exposed, - means (41, 64; 106, 46) for blocking the forward movement of the rod, characterized in that: - the blocking means (41, 64; 106, 46) are configured to be deactivated when the end-piece is moved toward its withdrawn position (figure 8; figure 14) or reaches that position, and to be reactivated during injection when the end-piece is moved toward its forward position (figure 2; figure 13) or arrives in that position, and - the means (41, 64) for blocking the forward movement of the rod comprise: - a first lever for blocking the movement of the rod, which is provided to block the forward movement of a rack arranged on the push rod, the end-piece comprising a cam freeing the blocking action of first lever on the rack, said cam driving the tilting of the first lever toward a free configuration of the rack when the end-piece arrives in the withdrawn position, or - two elastic fins, which belong to the end-piece and which are positioned on either side of the push rod, and two stops blocking the elastic fins in a position (figure 13) where the elastic fins keep the rod in a vise between them. - a cap, extending along a longitudinal axis, - a syringe for injecting a medicament, which is positioned inside the cap and which includes a needle, a needle protector, a body and a piston, - a rod for pushing the piston inside the syringe body, which is moved axially forward by a resilient load force exerted by a first spring, during an injection, - an end-piece for protecting the needle, which is movable axially around the needle and against a resilient load force exerted by a second spring, between a forward position (figure 2; figure 13) where it surrounds the needle and a withdrawn position (figure 8; figure 14), where the needle is exposed, - means (41, 64; 106, 46) for blocking the forward movement of the rod, - the blocking means (41, 64; 106, 46) are configured to be deactivated when the end-piece is moved toward its withdrawn position (figure 8; figure 14) or reaches that position, and to be reactivated during injection when the end-piece is moved toward its forward position (figure 2; figure 13) or arrives in that position, and - the means (41, 64) for blocking the forward movement of the rod comprise: - a first lever for blocking the movement of the rod, which is provided to block the forward movement of a rack arranged on the push rod, the end-piece comprising a cam freeing the blocking action of first lever on the rack, said cam driving the tilting of the first lever toward a free configuration of the rack when the end-piece arrives in the withdrawn position, or - two elastic fins, which belong to the end-piece and which are positioned on either side of the push rod, and two stops blocking the elastic fins in a position (figure 13) where the elastic fins keep the rod in a vise between them. - a first lever for blocking the movement of the rod, which is provided to block the forward movement of a rack arranged on the push rod, the end-piece comprising a cam freeing the blocking action of first lever on the rack, said cam driving the tilting of the first lever toward a free configuration of the rack when the end-piece arrives in the withdrawn position, or - two elastic fins, which belong to the end-piece and which are positioned on either side of the push rod, and two stops blocking the elastic fins in a position (figure 13) where the elastic fins keep the rod in a vise between them.