An implantable medical device comprising: a sensing circuit configured to receive a cardiac signal comprising far-field atrial events; a therapy delivery circuit configured to deliver ventricular pacing pulses via electrodes coupled to the therapy delivery circuit; and a control circuit configured to: control the therapy delivery circuit to deliver the ventricular pacing pulses in an atrial-synchronized pacing mode; during the atrial synchronized pacing mode, determine atrial cycle lengths between the far-field atrial events sensed from the cardiac signal; determine a difference between two atrial cycle lengths of the atrial cycle lengths; determine, based on the difference being greater than a cycle length change threshold, a cycle length change between the two atrial cycle lengths; after determining the cycle length change, determine if first pacing mode switching criteria is satisfied; and in response to determining that the first pacing mode switching criteria is satisfied, switch from the atrial-synchronized ventricular pacing mode to an atrial-asynchronous pacing mode for controlling the therapy delivery circuit in delivering the ventricular pacing pulses. a sensing circuit configured to receive a cardiac signal comprising far-field atrial events; a therapy delivery circuit configured to deliver ventricular pacing pulses via electrodes coupled to the therapy delivery circuit; and a control circuit configured to: control the therapy delivery circuit to deliver the ventricular pacing pulses in an atrial-synchronized pacing mode; during the atrial synchronized pacing mode, determine atrial cycle lengths between the far-field atrial events sensed from the cardiac signal; determine a difference between two atrial cycle lengths of the atrial cycle lengths; determine, based on the difference being greater than a cycle length change threshold, a cycle length change between the two atrial cycle lengths; after determining the cycle length change, determine if first pacing mode switching criteria is satisfied; and in response to determining that the first pacing mode switching criteria is satisfied, switch from the atrial-synchronized ventricular pacing mode to an atrial-asynchronous pacing mode for controlling the therapy delivery circuit in delivering the ventricular pacing pulses. control the therapy delivery circuit to deliver the ventricular pacing pulses in an atrial-synchronized pacing mode; during the atrial synchronized pacing mode, determine atrial cycle lengths between the far-field atrial events sensed from the cardiac signal; determine a difference between two atrial cycle lengths of the atrial cycle lengths; determine, based on the difference being greater than a cycle length change threshold, a cycle length change between the two atrial cycle lengths; after determining the cycle length change, determine if first pacing mode switching criteria is satisfied; and in response to determining that the first pacing mode switching criteria is satisfied, switch from the atrial-synchronized ventricular pacing mode to an atrial-asynchronous pacing mode for controlling the therapy delivery circuit in delivering the ventricular pacing pulses. <EOS>