An active implantable medical device of the cardiac prosthesis type, including antitachycardia atrial pacing and antibradycardia ventricular pacing therapies. The device includes circuits and control logic for detecting electrical atrial and ventricular spontaneous events (R), delivering low energy antitachycardia atrial pacing, and antibradycardia ventricular pacing, and able to deliver a ventricular pacing (V) in the absence of a detected spontaneous ventricular event (R) after a calculated ventricular escape interval (IE). The device includes a sensor delivering an endocardiac acceleration signal (EA) representative of the movements produced by the contractions of the ventricle. The ventricular sensing switches from detection of an electric potential of spontaneous ventricular depolarization (R), to detection of an endocardiac acceleration peak (PEA1) associated with a ventricular contraction in case of activation of the antitachycardia atrial pacing while post-atrial pacing refractory periods mask the detection of ventricular electrical activity.