The invention relates to an injection device for delivering a drug, comprising a housing arranged to receive a drug container and an electrical energy source, wherein a driver is arranged to displace a dose of the drug from the container under load of a drive spring upon release, wherein an electric motor powered by the electrical energy source is arranged for tensioning the drive spring, wherein control means are arranged for controlling the electric motor so as to tension the drive spring when an injection has been performed.