Drive system for a vehicle, wherein the drive system comprises an output shaft in a combustion engine, an input shaft of a gearbox, a first electrical machine comprising a stator and a rotor, a planetary gear comprising three components in the form of a sun wheel, a ring gear and a planetary wheel carrier, wherein the output shaft of the combustion engine is connected with a first of said components in the planetary gear, so that a rotation of such shaft leads to a rotation of such component, wherein the input shaft of the gearbox is connected with a second of said components of the planetary gear, so that a rotation of such shaft leads to a rotation of such component, and wherein the rotor of the electrical machine is connected with a third of said components in the planetary gear, so that a rotation of the rotor leads to a rotation of this component, wherein the drive system also comprises a first locking means, which may be moved between a locked position in which two of said components are locked together, so that the three components rotate with the same rotational speed, and a release position in which the components are allowed to rotate at different rotational speeds, the drive system further comprises a second electrical machine with a stator and a rotor, connected with the output shaft of the combustion engine between the combustion engine and said first component, a second locking means which may be moved between a locked position in which the output shaft of the combustion engine is locked to a stationary element in the vehicle, and a release position in which the combustion output shaft of the engine is disconnected from the stationary element, and free to rotate with the rotor of the second electrical machine and said first component, and at least one control device, adapted to control fuel supply to the combustion engine and to control exchange of electrical energy between the first and second electrical machine on the one hand, and, storage means of electric energy on the other hand, the control device being adapted to control said locking means (33, 34) to be moved between said locked position and release position and, in order to lock, to control the combustion engine and/or the first electrical machine and/or the second electrical machine to achieve the same rotational speed in the parts to be locked together by the respective locking means (33, 34), and, subsequently, to move the locking means to a locked position and, in order to release, to control the combustion engine and/or the first electrical machine and/or the second electrical machine to achieve a torque balance between the parts to be released from each other, and, subsequently, for the locking means to be moved to a release position, characterised in that the control device is adapted to control, when the vehicle is at a standstill with the combustion engine running at idling engine speed, the first locking means is in a release position, and the second locking means is in a release position to start driving the vehicle with power balance, • the first electrical machine for delivery of a torque thereof, so that the requested torque is transmitted to the input shaft of the gearbox, • the combustion engine towards and to its idling speed, • the second electrical machine to deliver a torque, so that the desired power to the energy storage means and electrical loads comprised in the vehicle are achieved, • in case the torque available in the combustion engine at idling speed is insufficient to both counteract the reaction torque from the first electrical machine, and the torque applied from the second electrical machine, to increase the engine speed of the combustion engine in order to increase the torque available from the combustion engine, and • the first locking means to be moved to a locked position when the input shaft of the gearbox, the rotor of the first electrical machine, and the output shaft of the combustion engine rotate with the same rotational speed. • the first electrical machine for delivery of a torque thereof, so that the requested torque is transmitted to the input shaft of the gearbox, • the combustion engine towards and to its idling speed, • the second electrical machine to deliver a torque, so that the desired power to the energy storage means and electrical loads comprised in the vehicle are achieved, • in case the torque available in the combustion engine at idling speed is insufficient to both counteract the reaction torque from the first electrical machine, and the torque applied from the second electrical machine, to increase the engine speed of the combustion engine in order to increase the torque available from the combustion engine, and • the first locking means to be moved to a locked position when the input shaft of the gearbox, the rotor of the first electrical machine, and the output shaft of the combustion engine rotate with the same rotational speed.