diff --git a/ldap_user/ldap_user.services.yml b/ldap_user/ldap_user.services.yml
index 226f5e13..14f65675 100644
--- a/ldap_user/ldap_user.services.yml
+++ b/ldap_user/ldap_user.services.yml
@@ -44,6 +44,7 @@ services:
       - '@ldap.user_manager'
       - '@ldap.bridge'
       - '@module_handler'
+      - '@queue'
 
   ldap.group_user_update_processor:
     class: Drupal\ldap_user\Processor\GroupUserUpdateProcessor
diff --git a/ldap_user/src/Plugin/QueueWorker/OrphanQueueWorker.php b/ldap_user/src/Plugin/QueueWorker/OrphanQueueWorker.php
new file mode 100644
index 00000000..76bb922b
--- /dev/null
+++ b/ldap_user/src/Plugin/QueueWorker/OrphanQueueWorker.php
@@ -0,0 +1,138 @@
+<?php
+
+namespace Drupal\ldap_user\Plugin\QueueWorker;
+
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\Queue\QueueFactory;
+use Drupal\Core\Queue\QueueWorkerBase;
+use Drupal\node\NodeInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * A queue worker to make sure no nodes are deleted during orphan processing.
+ *
+ * @QueueWorker(
+ *   id = "ldap_user_orphan_worker",
+ *   title = @Translation("LDAP Orphan worker"),
+ *   cron = {"time" = 60}
+ * )
+ */
+class OrphanQueueWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * {@inheritDoc}
+   */
+  public function __construct(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      protected EntityTypeManagerInterface $entityTypeManager,
+      protected ModuleHandlerInterface $moduleHandler,
+      protected QueueFactory $queueFactory
+    ) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public static function create(ContainerInterface $container, $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('entity_type.manager'),
+      $container->get('module_handler'),
+      $container->get('queue')
+    );
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public function processItem($data) {
+    $method = $data['method'];
+    $uid = $data['uid'];
+    $account = $this->entityTypeManager->getStorage('user')->load($uid);
+    if (empty($account)) {
+      return;
+    }
+
+    $updates = [];
+
+    /** @var \Drupal\node\NodeStorageInterface $node_storage */
+    $node_storage = $this->entityTypeManager->getStorage('node');
+    if ($method == 'user_cancel_reassign') {
+      $nids = $node_storage->userRevisionIds($account);
+      $updates = [
+        'uid' => 0,
+        'revision_uid' => 0,
+      ];
+      $nodes = [];
+      $to_process = array_splice($nids, 0, 10);
+      if (!empty($to_process)) {
+        foreach ($to_process as $vid) {
+          $nodes[] = $node_storage->loadRevision($vid);
+        }
+      }
+    }
+    elseif ($method == 'user_cancel_block_unpublish') {
+      $nids = $node_storage->getQuery()
+        ->accessCheck(FALSE)
+        ->condition('uid', $account->id())
+        ->execute();
+      $updates = [
+        'status' => 0,
+      ];
+      $to_process = array_splice($nids, 0, 10);
+      if (!empty($to_process)) {
+        $nodes = $node_storage->loadMultiple($to_process);
+      }
+    }
+
+    foreach ($nodes as $node) {
+      $this->nodeUpdateHelper($node, $updates);
+    }
+    if (!empty($nids)) {
+      $this->queueFactory->get('ldap_user_orphan_worker')->createItem($data);
+    }
+    else {
+      $account = $this->entityTypeManager->getStorage('user')->load($data['uid']);
+      $edit = [];
+      $this->moduleHandler->invokeAll(
+        'user_cancel',
+        [$edit, $account, $method]
+      );
+      _user_cancel($edit, $account, $method);
+    }
+  }
+
+  /**
+   * Copy of _node_mass_update_helper.
+   *
+   * This is mostly a copy of the mentioned function but also sets the node as
+   * syncing to prevent issues if content_moderation module is used.
+   *
+   * @see _node_mass_update_helper()
+   */
+  protected function nodeUpdateHelper(NodeInterface $node, array $updates) {
+    $langcodes = array_keys($node->getTranslationLanguages());
+
+    // Set node as syncing to prevent creating a new revision and setting
+    // revision_uid to 0 to be impossible if content_moderation module is used.
+    $node->original = clone $node;
+    $node->setSyncing(TRUE);
+    $node->setNewRevision(FALSE);
+
+    foreach ($langcodes as $langcode) {
+      foreach ($updates as $name => $value) {
+        $node->getTranslation($langcode)->$name = $value;
+      }
+    }
+    $node->save();
+    return $node;
+  }
+
+}
diff --git a/ldap_user/src/Processor/OrphanProcessor.php b/ldap_user/src/Processor/OrphanProcessor.php
index 28acbfa4..2bc23fbc 100644
--- a/ldap_user/src/Processor/OrphanProcessor.php
+++ b/ldap_user/src/Processor/OrphanProcessor.php
@@ -9,6 +9,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\Mail\MailManagerInterface;
+use Drupal\Core\Queue\QueueFactory;
 use Drupal\Core\State\StateInterface;
 use Drupal\Core\Url;
 use Drupal\ldap_servers\LdapBridgeInterface;
@@ -112,6 +113,13 @@ class OrphanProcessor {
    */
   protected $moduleHandler;
 
+  /**
+   * Queue factory instance.
+   *
+   * @var \Drupal\Core\Queue\QueueFactory
+   */
+  protected $queueFactory;
+
   /**
    * Constructor.
    *
@@ -133,6 +141,8 @@ class OrphanProcessor {
    *   LDAP bridge.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   Module handler.
+   * @param \Drupal\Core\Queue\QueueFactory $queue_factory
+   *   Queue factory instance.
    */
   public function __construct(
     LoggerInterface $logger,
@@ -144,6 +154,7 @@ class OrphanProcessor {
     LdapUserManager $ldap_user_manager,
     LdapBridgeInterface $ldap_bridge,
     ModuleHandlerInterface $module_handler,
+    QueueFactory $queue_factory
   ) {
     $this->logger = $logger;
     $this->configFactory = $config;
@@ -155,6 +166,7 @@ class OrphanProcessor {
     $this->ldapUserManager = $ldap_user_manager;
     $this->ldapBridge = $ldap_bridge;
     $this->moduleHandler = $module_handler;
+    $this->queueFactory = $queue_factory;
 
     $storage = $this->entityTypeManager->getStorage('ldap_server');
     $data = $storage->getQuery()
@@ -407,13 +419,23 @@ class OrphanProcessor {
     // for the user entity. Modules should use those hooks to respond to the
     // account deletion.
     $edit = [];
-    if ($method !== 'user_cancel_delete') {
-      $this->moduleHandler->invokeAll(
-        'user_cancel',
-        [$edit, $account, $method]
-      );
+    if ($method == 'user_cancel_reassign' || $method == 'user_cancel_block_unpublish') {
+      $job = [
+        'method' => $method,
+        'uid' => $account->id(),
+      ];
+      $queue = $this->queueFactory->get('ldap_user_orphan_worker');
+      $queue->createItem($job);
+    }
+    else {
+      if ($method !== 'user_cancel_delete') {
+        $this->moduleHandler->invokeAll(
+          'user_cancel',
+          [$edit, $account, $method]
+        );
+      }
+      _user_cancel($edit, $account, $method);
     }
-    _user_cancel($edit, $account, $method);
   }
 
   /**
