An apparatus for terminating an atrial fibrillation of an atrium of a heart, the apparatus comprising: - at least one sensor configured to provide an electric signal representative of the present electric state of the atrium; - a determination unit configured to determine from the electrical signal whether the present electric state of the biological tissue is an atrial fibrillation; - an electric pulse generator for generating at least one series of electric low energy anti-fibrillation pacing pulses at intervals; - at least one electrode connected to the pulse generator configured to apply the low energy anti-fibrillation pacing pulses to the atrium; - at least one further sensor configured to provide a further electric signal representative of an ventricular action potential of a ventricle of the heart; - a further electric pulse generator configured to generate electric pacing pulses; - at least one further electrode connected to the further pulse generator and configured to apply the electric pacing pulses to the ventricle; and - a synchronization unit configured to synchronize the at least one series of low energy anti-fibrillation pacing pulses with the electric pacing pulses such that no low energy anti-fibrillation pacing pulse of the at least one series of low energy anti-fibrillation pacing pulses is applied in a vulnerable window during which the ventricle is susceptible to shock-induced ventricular fibrillation, characterized in that the electric pulse generator generates the at least one series of electric low energy anti-fibrillation pacing pulses at intervals depending on the electrical signal representative of the present electric state of the atrium. - at least one sensor configured to provide an electric signal representative of the present electric state of the atrium; - a determination unit configured to determine from the electrical signal whether the present electric state of the biological tissue is an atrial fibrillation; - an electric pulse generator for generating at least one series of electric low energy anti-fibrillation pacing pulses at intervals; - at least one electrode connected to the pulse generator configured to apply the low energy anti-fibrillation pacing pulses to the atrium; - at least one further sensor configured to provide a further electric signal representative of an ventricular action potential of a ventricle of the heart; - a further electric pulse generator configured to generate electric pacing pulses; - at least one further electrode connected to the further pulse generator and configured to apply the electric pacing pulses to the ventricle; and - a synchronization unit configured to synchronize the at least one series of low energy anti-fibrillation pacing pulses with the electric pacing pulses such that no low energy anti-fibrillation pacing pulse of the at least one series of low energy anti-fibrillation pacing pulses is applied in a vulnerable window during which the ventricle is susceptible to shock-induced ventricular fibrillation, characterized in that the electric pulse generator generates the at least one series of electric low energy anti-fibrillation pacing pulses at intervals depending on the electrical signal representative of the present electric state of the atrium.