Control method for a wind farm connected to a power grid and comprising a plurality of generating units and a local controller associated to each generating unit , whereby the presence or absence of a voltage disturbance in the grid is determined in a dynamic and recurrent manner, a control phase being implemented in a dynamic and recurrent manner when the presence of a disturbance is determined, and the generating units being controlled during said presence so that they generate power and participate in stabilizing the voltage of the grid during said control phase, wherein furthermore, when the disappearance of said disturbance is determined in the method, and in the absence of another disturbance, implementation of the control phase stops and a stabilization phase is implemented in a dynamic and recurrent manner for a limited time interval, while the generating units continue to be controlled for generating power during said stabilization phase for providing a smooth and controlled transient until the voltage of the grid stabilizes, wherein when a local controller determines the presence of a disturbance, said local controller operates in a local mode at the beginning of the control phase and at the beginning of the stabilization phase, for a limited time interval in each case, acting on its associated unit without following instructions of a farm controller , and then acts, during said phases and after the respective time interval has elapsed, on its associated unit following instructions from the farm controller , wherein when a local controller acts in said local mode, a reactive power generation mode is activated for the associated unit if the value of a measured electrical characteristic at a local point of coupling (LV), based on which the corresponding disturbance has been determined, is greater than a specific reference value for said electrical characteristic and is within a specific range of values above said reference value, or if said value is less than said reference value and is within a specific range of values below said reference value, said reactive power generation mode being maintained while said disturbance lasts and said value is maintained within one of said ranges, a reactive current generation mode being activated for said unit if said value is outside both ranges and said reactive current generation mode being maintained while said disturbance lasts and said value is maintained outside both ranges, said unit generating reactive power according to a local reactive power reference when it is in the reactive power generation mode and generating reactive current according to a local reactive current reference when it is in the reactive current generation mode, wherein the reactive power or current to be produced by a unit when it is in the reactive power generation mode or in the reactive current generation mode, respectively, is proportional to the measured value of said electrical characteristic at its point of coupling (LV), wherein the reactive current and power produced by each unit are monitored at all times, the monitored values of the produced reactive current and power being frozen when the corresponding local controller determines the presence of a disturbance, the frozen value of the reactive current being added to the reactive current to be produced proportional to the measured value of said electrical characteristic when said unit is in the reactive current generation mode, and the frozen value of the reactive power being added to the reactive power to be produced proportional to said measured value when said unit is in the reactive power generation mode. <EOS>