Method for detecting cardiac events, e.g., Atrial Fibrillation (AF) or termination of AF. Based on analysis of the instability observed in heart rate, caused by irregular conduction from the atrium during AF. Change in heart interval is monitored on beat-to-beat basis to recognize instability that indicates presence of AF or Atrial Flutter. A packet of a number of consecutive intervals is evaluated, whether the length of an interval is stable compared with the length of the preceding interval, or whether the length of the subsequent interval has changed. After detection of an instability, instability counter is incremented. The result of the stability test for a packet of intervals is represented by the value of the instability counter. Depending upon whether or not an AF already declared, (indicated by AF status flag), different “X-out-of-Y” criterion are applied. AF status flag set/cleared when declaring AF/termination of AF.