diff --git a/patroni/ha.py b/patroni/ha.py
index a853b7ce1..b56d61804 100644
--- a/patroni/ha.py
+++ b/patroni/ha.py
@@ -1218,6 +1218,10 @@ def enforce_primary_role(self, message: str, promote_message: str) -> str:
                     logger.warning("Releasing the leader key voluntarily because the pre-promote script failed")
                     self._released_leader_key_timestamp = time.monotonic()
                     self.release_leader_key_voluntarily()
+                    if not self.state_handler.is_primary():
+                        # the leader key is gone and nobody will feed the watchdog anymore,
+                        # disarm it to avoid a reset while the node is in the backoff as a replica
+                        self.watchdog.disable()
                     # discard the result of the failed pre-promote script to be able to re-try promote
                     self._async_response.reset()
                     return 'Promotion cancelled because the pre-promote script failed'
diff --git a/tests/test_ha.py b/tests/test_ha.py
index 47ded458d..fce96f504 100644
--- a/tests/test_ha.py
+++ b/tests/test_ha.py
@@ -425,9 +425,23 @@ def test_promotion_cancelled_after_pre_promote_failed(self):
         self.p.is_primary = false
         self.p._pre_promote = false
         self.ha._is_healthiest_node = true
-        self.assertEqual(self.ha.run_cycle(), 'promoted self to leader by acquiring session lock')
-        self.assertEqual(self.ha.run_cycle(), 'Promotion cancelled because the pre-promote script failed')
-        self.assertEqual(self.ha.run_cycle(), 'following a different leader because i am not the healthiest node')
+        with patch.object(Watchdog, 'disable') as mock_disable:
+            self.assertEqual(self.ha.run_cycle(), 'promoted self to leader by acquiring session lock')
+            mock_disable.assert_not_called()
+            self.assertEqual(self.ha.run_cycle(), 'Promotion cancelled because the pre-promote script failed')
+            # the leader key is released, nobody feeds the watchdog anymore
+            mock_disable.assert_called_once()
+            self.assertEqual(self.ha.run_cycle(), 'following a different leader because i am not the healthiest node')
+
+    def test_pre_promote_failed_keeps_watchdog_on_primary(self):
+        self.p.is_primary = false
+        self.p._pre_promote = false
+        self.ha._is_healthiest_node = true
+        with patch.object(Watchdog, 'disable') as mock_disable:
+            self.assertEqual(self.ha.run_cycle(), 'promoted self to leader by acquiring session lock')
+            self.p.is_primary = true
+            self.assertEqual(self.ha.run_cycle(), 'Promotion cancelled because the pre-promote script failed')
+            mock_disable.assert_not_called()
 
     def test_lost_leader_lock_during_promote(self):
         with patch('patroni.async_executor.AsyncExecutor.busy', PropertyMock(return_value=True)):
