The present invention relates to an injection device, comprising a housing (10) including a container carrier (16) having a medicament container (18) and a needle (22) attached to the medicament container, a needle shield (12), means for initiating a penetration penetration means for automatic penetration of needle, means for automatically injecting medicament, means for an automatically withdrawing the needle. The invention is characterized in an active triggering withdrawal mechanism capable of allowing the means for automatically withdrawing the needle to be triggered when the injection device starts to be removed from an injection site.