Method for control of a vehicle with a drive system comprising a planetary gear which comprises three components in the form of a sun wheel , a ring gear and planetary wheel carrier , wherein a first input shaft in the planetary gear is connected with a first of said components of the planetary gear, so that a rotation of such shaft leads to a rotation of such component, wherein a second output shaft of the planetary gear is connected with a second of said components in the planetary gear, for transmission of torque for the propulsion of the vehicle, so that a rotation of such shaft leads to a rotation of such component, wherein the drive system comprises a first electrical machine with a stator and a rotor , which is connected with a third of said components of the planetary gear, so that a rotation of the rotor leads to a rotation of such component, and 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 with different rotational speeds, a vehicle being controlled, whose drive system also comprises a second electrical machine with a stator and a rotor , connected with said input shaft of the planetary gear, and at least one energy storage means , arranged for exchange of energy between this and the first and second electrical machines, and/or a controllable energy consumer, the control being carried out of a vehicle whose drive system also comprises a combustion engine , which, when the method is performed, has an output shaft connected with the second electrical machine's rotor , characterized in that the method comprises the following steps in order to brake the vehicle towards a stop, when the vehicle is driven with the first locking means in a locked position: a) distribution of the desired braking torque between the first and the second electrical machines, and b) controlling the first and second electrical machines to transmit a total torque to said output shaft of the planetary gear, which corresponds to the desired braking torque at least to a predetermined low speed limit, before the vehicle stops, wherein in step b) the first and the second electrical machines, when the vehicle's speed has dropped below a certain value , which is a value between 5 and 10 km/h, are controlled in such a way that torque balance is achieved in the planetary gear, while the total torque transmitted to said output shaft of the planetary gear corresponds to the desired braking torque, consequently: c) shifting of the first locking means to the release position, when said torque balance prevails in the planetary gear, and d) controlling the combustion engine towards the idling speed of the combustion engine. a) distribution of the desired braking torque between the first and the second electrical machines, and b) controlling the first and second electrical machines to transmit a total torque to said output shaft of the planetary gear, which corresponds to the desired braking torque at least to a predetermined low speed limit, before the vehicle stops, wherein in step b) the first and the second electrical machines, when the vehicle's speed has dropped below a certain value , which is a value between 5 and 10 km/h, are controlled in such a way that torque balance is achieved in the planetary gear, while the total torque transmitted to said output shaft of the planetary gear corresponds to the desired braking torque, consequently: c) shifting of the first locking means to the release position, when said torque balance prevails in the planetary gear, and d) controlling the combustion engine towards the idling speed of the combustion engine. <EOS>