A method for braking a vehicle driving forward towards stop, said vehicle having a propulsion system comprising a combustion engine with an output shaft , a gearbox with an input shaft , an electric machine comprising a stator and a rotor , and a planetary gear comprising three components in the form of a sun gear , a ring gear and a planet wheel carrier , the output shaft of the combustion engine being connected to a first of said components of the planetary gear so that a rotation of this shaft results in a rotation of this component, said input shaft of the gearbox being connected to a second of said components of the planetary gear so that a rotation of this shaft results in a rotation of this component and the rotor of the electric machine being connected to a third of said components of the planetary gear so that a rotation of the rotor results in a rotation of this component, said propulsion system further comprising locking means transferable between a locking position in which two of said components are interlocked so that the three components (10-12) rotate with the same rotational speed and a releasing position in which the components are allowed to rotate with different rotational speeds, characterised in that the method comprises the following steps: a) controlling the electric machine and/or the combustion engine so that a state of zero torque is obtained between the components interlocked by the locking means, b) transferring said locking means to said releasing position, c) controlling the electric machine and/or the combustion engine so that they through the input shaft of the gearbox create a state of zero torque in the gearbox d) disengaging the gear presently engaged in the gearbox, e) controlling the electric machine and/or the combustion engine so that the rotational speed of the third component together with the rotational speed of the output shaft of the combustion engine give the input shaft of the gearbox a rotational speed which for the existing speed of the vehicle is synchronized with the shaft rotational speed for a reverse gear of the gearbox, f) engaging said reverse gear of the gearbox , g) checking brake torque requested of the propulsion system, and h) controlling the electric machine to apply brake torque requested through the third component to the input shaft of the gearbox, in which the steps a) and b) are omitted in case said locking means is in the releasing position at the start of the method. a) controlling the electric machine and/or the combustion engine so that a state of zero torque is obtained between the components interlocked by the locking means, b) transferring said locking means to said releasing position, c) controlling the electric machine and/or the combustion engine so that they through the input shaft of the gearbox create a state of zero torque in the gearbox d) disengaging the gear presently engaged in the gearbox, e) controlling the electric machine and/or the combustion engine so that the rotational speed of the third component together with the rotational speed of the output shaft of the combustion engine give the input shaft of the gearbox a rotational speed which for the existing speed of the vehicle is synchronized with the shaft rotational speed for a reverse gear of the gearbox, f) engaging said reverse gear of the gearbox , g) checking brake torque requested of the propulsion system, and h) controlling the electric machine to apply brake torque requested through the third component to the input shaft of the gearbox, <EOS>