A method for braking a vehicle driving forward, 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 in the form of the sun gear so that a rotation of this shaft results in a rotation of the sun gear, 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 rotate with the same rotational speed and a releasing position in which the components are allowed to rotate with different rotational speeds, said method being started when the vehicle is driven forward with the locking means in the releasing position and the third component rotates with a higher rotational speed than the first component, the method comprising the following steps: a) controlling the electric machine to apply a brake torque requested to the input shaft of the gearbox exceeding the product of on one hand the torque needed for driving the combustion engine to rotate and on the other the transmission ratio of the planetary gear, b) checking and comparing the rotations speeds of at least two of the sun gear, the ring gear and the planet wheel carrier, in which the step a) is continued while repeatedly or continuously carrying out step b) until the comparison in step b) shows that the condition that the rotational speeds of two of the sun gear, the ring gear and the planet wheel carrier is substantially equal is met, c) transferring the locking means to the locking position when said condition is met, characterized in that the method is carried out for a propulsion system in which said locking means comprises a coupling member fixed against rotation to the output shaft of the combustion engine by means of a splined connection, being displaceable in the axial direction on the output shaft of the combustion engine and having a coupling portion connectable to a coupling portion of the planet wheel carrier, that said coupling portion is movable by a displacing member with respect to the coupling portion between a second position of mutual engagement defining the locking position of the locking means and a first position of mutual disengagement defining a releasing position of the locking means, and that the sun gear and the planet wheel carrier are interlocked in step c). a) controlling the electric machine to apply a brake torque requested to the input shaft of the gearbox exceeding the product of on one hand the torque needed for driving the combustion engine to rotate and on the other the transmission ratio of the planetary gear, b) checking and comparing the rotations speeds of at least two of the sun gear, the ring gear and the planet wheel carrier, in which the step a) is continued while repeatedly or continuously carrying out step b) until the comparison in step b) shows that the condition that the rotational speeds of two of the sun gear, the ring gear and the planet wheel carrier is substantially equal is met, c) transferring the locking means to the locking position when said condition is met, characterized in that the method is carried out for a propulsion system in which said locking means comprises a coupling member fixed against rotation to the output shaft of the combustion engine by means of a splined connection, being displaceable in the axial direction on the output shaft of the combustion engine and having a coupling portion connectable to a coupling portion of the planet wheel carrier, that said coupling portion is movable by a displacing member with respect to the coupling portion between a second position of mutual engagement defining the locking position of the locking means and a first position of mutual disengagement defining a releasing position of the locking means, and that the sun gear and the planet wheel carrier are interlocked in step c).