An LED driver comprising: - a power converter arranged to power an LED unit ; - a control unit (CU) arranged to control the power converter ; the power converter comprising ∘ an input terminal configured to receive a rectified AC supply voltage from an electronic transformer or a TRIAC dimmer, said electronic transformer or said TRIAC dimmer requiring an output current above a certain level, and ∘ an output terminal configured to supply a current to the LED unit, the control unit comprising - an input configured to receive a supply signal representative of the rectified AC supply voltage and - an output configured to provide a control signal to the power converter, whereby the LED driver further comprises - an energy storage element (60, 155.1) connectable to the input terminal and - a first switch (155.2) for connecting and disconnecting the energy storage element (155.1) to the input terminal, the first switch being controlled by the control unit, characterised in that the control unit is arranged to sustain the rectified AC supply voltage, in order to keep the rectified AC supply voltage in existence, at least during part of a period of the AC supply voltage, by: - determining the control signal for controlling the power converter based on the supply signal, - controlling the power converter to supply the current to the LED unit based on the control signal, the current being amplitude modulated in phase or in synchronism with the rectified AC supply voltage and - controlling the first switch (155.2) based on the supply signal so as to maintain said output current above said certain level, to keep the rectified AC supply voltage in existence, at least during said part of a period of the AC supply voltage, and in that the energy storage element (60, 155.1) is adapted to supply the LED driver with a supply voltage when the rectified AC supply voltage is low. - a power converter arranged to power an LED unit ; - a control unit (CU) arranged to control the power converter ; the power converter comprising ∘ an input terminal configured to receive a rectified AC supply voltage from an electronic transformer or a TRIAC dimmer, said electronic transformer or said TRIAC dimmer requiring an output current above a certain level, and ∘ an output terminal configured to supply a current to the LED unit, the control unit comprising ∘ an input terminal configured to receive a rectified AC supply voltage from an electronic transformer or a TRIAC dimmer, said electronic transformer or said TRIAC dimmer requiring an output current above a certain level, and ∘ an output terminal configured to supply a current to the LED unit, - an input configured to receive a supply signal representative of the rectified AC supply voltage and - an output configured to provide a control signal to the power converter, whereby - an energy storage element (60, 155.1) connectable to the input terminal and - a first switch (155.2) for connecting and disconnecting the energy storage element (155.1) to the input terminal, the first switch being controlled by the control unit, - determining the control signal for controlling the power converter based on the supply signal, - controlling the power converter to supply the current to the LED unit based on the control signal, the current being amplitude modulated in phase or in synchronism with the rectified AC supply voltage and - controlling the first switch (155.2) based on the supply signal so as to maintain said output current above said certain level, to keep the rectified AC supply voltage in existence, at least during said part of a period of the AC supply voltage, and in that the energy storage element (60, 155.1) is adapted to supply the LED driver with a supply voltage when the rectified AC supply voltage is low. <EOS>