The present invention relates to an injection device for delivering set doses of a liquid drug to a user. The injection device has a scale drum for displaying the set dose, which scale drum is helically guided in a housing. The scale drum is thus rotational in relation to the housing between a zero position and a set position for displaying the set dose. Further, a needle cannula secured to a hub is mounted in an axially movable manner. The axial movement of the hub is generated by a spring. A blocking mechanism interacting between the scale drum and hub controls the axial movement of the hub such that the needle cannula automatically retracts from the skin of a user in response to the scale drum reaching the zero position.