A drive mechanism (11) for a delivery device comprising —a drive member (17) for driving a piston rod (13) —a moveable dose setting member (19, 35) being decoupled from the drive member (17) in a dose setting state the dose setting member (19, 35) being moveable in a drive direction in a dose delivery state, wherein the movement of the dose setting member (19, 35) is transferred to the drive member (17) and —a dose control means (49) being coupled to the dose setting member (19, 35) by a rack-and-pinion means (51, 67) in such a manner that the movement of the dose setting member (19, 35) is transferred to a movement of the dose control means (49), wherein the movement of the dose setting member (19, 35) is stopped when the dose control means (49) reaches an end position.