A method for controlling a relay ; wherein the relay comprises a movable anchor and a coil which is configured to exert a force onto the anchor subject to a coil current at a control port , in order to connect contacts of the relay ; wherein the method comprises - applying , at a control time instant , a control signal to the control port for initiating a switch-off event or a switch-on event of the relay ; wherein the control time instant depends on a previously determined control delay of the relay ; - determining a temporal course of the coil current subject to the control signal; - detecting a disconnect time instant , at which the contacts of the relay disconnect, or a connect time instant , at which the contacts of the relay connect, based on a derivative of the temporal course of the coil current ; and - the contacts of the relay are configured to enable or to disable an electrical connection between load ports of the relay ; characterised by - updating the control delay based on the detected disconnect time instant or based on the detected connect time instant , wherein - an AC voltage is applied to the load ports ; - the method comprises, determining a zero crossing time instant of the AC voltage , at which the AC voltage changes polarity; and - the method comprises, determining the control time instant based on the previously determined control delay and based on the zero crossing time instant and wherein - the method comprises, determining the control time instant as the zero crossing time instant minus the previously determined control delay and minus an offset ; and - the offset depends on a degree of reliability, a statistical scatter, of the control delay . - applying , at a control time instant , a control signal to the control port for initiating a switch-off event or a switch-on event of the relay ; wherein the control time instant depends on a previously determined control delay of the relay ; - determining a temporal course of the coil current subject to the control signal; - detecting a disconnect time instant , at which the contacts of the relay disconnect, or a connect time instant , at which the contacts of the relay connect, based on a derivative of the temporal course of the coil current ; and - the contacts of the relay are configured to enable or to disable an electrical connection between load ports of the relay ; characterised by - updating the control delay based on the detected disconnect time instant or based on the detected connect time instant , wherein - an AC voltage is applied to the load ports ; - the method comprises, determining a zero crossing time instant of the AC voltage , at which the AC voltage changes polarity; and - the method comprises, determining the control time instant based on the previously determined control delay and based on the zero crossing time instant and wherein - the method comprises, determining the control time instant as the zero crossing time instant minus the previously determined control delay and minus an offset ; and - the offset depends on a degree of reliability, a statistical scatter, of the control delay . - the method comprises, determining the control time instant based on the previously determined control delay and based on the zero crossing time instant and wherein - the method comprises, determining the control time instant as the zero crossing time instant minus the previously determined control delay and minus an offset ; and - the offset depends on a degree of reliability, a statistical scatter, of the control delay . <EOS>