The invention concerns an implantable medical device (pacemaker, cardioverter /defi-brillator) havinga housing, containingan atrial and an ventricular sensing stage anda ventricular stimulation pulse generator,a ventricular pacing pulse timer,an atrial tachycardia/fibrillation detectora ventricular rate determination stage anda mode switching stagewhereinthe sensing stages and the stimulation pulse generator are at least indirectly connected to a lead-connector (in a header)for an intracardiac sensing/pacing lead to receive electrical signals from the atrium and the ventricle of a heart and to deliver pacing pulses to the ventricle of the heart,the atrial sensing stage is further connected to the atrial tachycardia/fibrillation detector (ventricular sensing stage may as well be connected to A-tach/Fib Detector in order to eliminate far-field senses of ventricular events in the atrium)the ventricular pacing pulse timer is connected to the ventricular sensing stage, to the ventricular stimulation pulse generator and to the ventricular rate determination stage,the ventricular pacing pulse timer is adaptedto trigger the ventricular stimulation pulse generator to deliver a ventricular stimulation pulse upon time out of a ventricular escape interval (VEI) andto inhibit the delivery of a ventricular pacing pulse if a ventricular event is sensed by the ventricular sensing stage prior to time-out of the ventricular escape interval,the ventricular rate determination stage is adapted to generate an appropriate ventricular escape interval duration value andthe mode switching stage is connected to the atrial tachycardia/fibrillation detector and to the ventricular pacing pulse timer to switch the pacing mode from an atrium-synchronous mode to a non-synchronous mode upon detection of an atrial tachycardia or atrial fibrillation or both,wherebya PIZ determination stage for determining a physiological interval zone (PIZ) which determines a range of appropriate ventricular escape in