Method for the production of a metal component, in particular a vane component of a turbomachine, which, in order to generate a three-dimensional shape, is electrochemically machined to remove material, to which end at least one electrode is positioned so as to be adjacent to and, by way of a duct gap, spaced apart from a component portion to be machined, and in the presence of an electrolyte a current and a voltage are applied to the electrode and the component, and the electrode is moved in the direction of the component from an initial position to a terminal position by means of a drive motor, characterized in that - in a first operating mode, the material is removed, with a permanently applied current and a permanently applied voltage and a constant electrolyte flow through the duct gap, by means of constant advancement of the electrode, effected by means of the drive motor, from the initial position in the direction of the component while maintaining a first gap width, wherein the material removal depth is continuously detected and it is continuously checked whether the detected material removal depth corresponds to a predetermined material removal depth; and in that, - when the predetermined material removal depth is reached, an automatic changeover to a second operating mode takes place immediately in that the same electrode as in the first operating mode is moved by means of the same drive motor in a cyclical manner between a non-operating position and an operating position having a second gap width which is smaller than the first gap width, wherein a current pulse and voltage pulse are applied only in the operating position, and the electrolyte flows through the gap at least in the non-operating position, wherein, during the second operating mode, the material removal depth is continuously detected and the detected material removal depth is continuously compared with a final depth to be achieved, the latter marking the achievement of the terminal position of the electrode actuation, wherein the second operating mode is maintained until the final geometry to be generated has been achieved. - in a first operating mode, the material is removed, with a permanently applied current and a permanently applied voltage and a constant electrolyte flow through the duct gap, by means of constant advancement of the electrode, effected by means of the drive motor, from the initial position in the direction of the component while maintaining a first gap width, wherein the material removal depth is continuously detected and it is continuously checked whether the detected material removal depth corresponds to a predetermined material removal depth; and in that, - when the predetermined material removal depth is reached, an automatic changeover to a second operating mode takes place immediately in that the same electrode as in the first operating mode is moved by means of the same drive motor in a cyclical manner between a non-operating position and an operating position having a second gap width which is smaller than the first gap width, wherein a current pulse and voltage pulse are applied only in the operating position, and the electrolyte flows through the gap at least in the non-operating position, wherein, during the second operating mode, the material removal depth is continuously detected and the detected material removal depth is continuously compared with a final depth to be achieved, the latter marking the achievement of the terminal position of the electrode actuation, wherein the second operating mode is maintained until the final geometry to be generated has been achieved.