An autoinjector having a body (1) approximately cylindrical in shape and to receive a reservoir containing fluid and including a piston (P) and a needle. The body (1) has a distal portion, a middle portion, and a proximal portion, and a removable cap (20) fastened to the proximal portion. The middle portion is approximately cylindrical in shape and includes a first anti-rolling mechanism (125) forming at least one middle non-cylindrical zone in the external profile of the middle portion. The removable cap (20) is approximately cylindrical in shape and includes a second anti-rolling mechanism (21) forming at least one proximal non-cylindrical zone in the external profile of the removable cap (20). In addition or optionally, the distal portion of the body (1) is approximately cylindrical in shape and includes a third anti-rolling mechanism (115) forming at least one distal non-cylindrical zone in the external profile of the distal portion.