A brake system for a rail vehicle, which brake system comprises: a brake actuator configured to receive a brake command (cmd P), and in response thereto produce an electric brake-force signal, and a brake unit comprising first and second pressing members (211, 212) and a rotatable member being mechanically linked to at least one wheel of the rail vehicle, which brake unit is configured to receive the electric brake-force signal, and in response thereto cause the first and second pressing members (211, 212) to apply a braking force to the rotatable member, a gear assembly arranged to operate mechanically on the first and second pressing members (211; 212), and a self-locking mechanism (300, 400, 500, 600) configured to lock the first and second pressing members (211; 212) if a supply of electric power to the brake unit fails, characterized in that the brake unit comprises: a stepper motor configured to act on the gear assembly in response to the electric brake-force signal, so as to cause the first and second pressing members (211; 212) to move towards or away from the rotatable member and attain a specified position interrelationship, and a position sensor configured to produce a position signal indicating an angular position of a power transmission shaft of the stepper motor, wherein the brake unit is configured to receive the position signal, and based thereon determine whether the specified position interrelationship has been attained; and if so, stop producing the electric brake-force signal allowing the self-locking mechanism (300, 400, 500, 600) to lock the first and second pressing members (211; 212) in the specified position interrelationship. a brake actuator configured to receive a brake command (cmd P), and in response thereto produce an electric brake-force signal, and a brake unit comprising first and second pressing members (211, 212) and a rotatable member being mechanically linked to at least one wheel of the rail vehicle, which brake unit is configured to receive the electric brake-force signal, and in response thereto cause the first and second pressing members (211, 212) to apply a braking force to the rotatable member, a gear assembly arranged to operate mechanically on the first and second pressing members (211; 212), and a self-locking mechanism (300, 400, 500, 600) configured to lock the first and second pressing members (211; 212) if a supply of electric power to the brake unit fails, characterized in that the brake unit comprises: a stepper motor configured to act on the gear assembly in response to the electric brake-force signal, so as to cause the first and second pressing members (211; 212) to move towards or away from the rotatable member and attain a specified position interrelationship, and a position sensor configured to produce a position signal indicating an angular position of a power transmission shaft of the stepper motor, a stepper motor configured to act on the gear assembly in response to the electric brake-force signal, so as to cause the first and second pressing members (211; 212) to move towards or away from the rotatable member and attain a specified position interrelationship, and a position sensor configured to produce a position signal indicating an angular position of a power transmission shaft of the stepper motor, wherein the brake unit is configured to receive the position signal, and based thereon determine whether the specified position interrelationship has been attained; and if so, stop producing the electric brake-force signal allowing the self-locking mechanism (300, 400, 500, 600) to lock the first and second pressing members (211; 212) in the specified position interrelationship.