diff --git a/panels.services.yml b/panels.services.yml
index a54a1d7..c75cf00 100644
--- a/panels.services.yml
+++ b/panels.services.yml
@@ -16,3 +16,8 @@ services:
     arguments: ['@panels.storage_manager']
     tags:
       - { name: access_check, applies_to: _panels_storage_access }
+  inline_block.loader.tempstore:
+    class: Drupal\panels\InlineBlockSubscriber
+    arguments: ['@database', '@user.shared_tempstore']
+    tags:
+      - { name: event_subscriber }
diff --git a/src/InlineBlockSubscriber.php b/src/InlineBlockSubscriber.php
new file mode 100644
index 0000000..79adb58
--- /dev/null
+++ b/src/InlineBlockSubscriber.php
@@ -0,0 +1,103 @@
+<?php
+
+namespace Drupal\panels;
+
+use Drupal\Core\Database\Connection;
+use Drupal\ctools\Event\BlockVariantEvent;
+use Drupal\ctools\Event\BlockVariantEvents;
+use Drupal\ctools_inline_block\BlockLoaderInterface;
+use Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant;
+use Drupal\user\SharedTempStoreFactory;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+class InlineBlockSubscriber implements EventSubscriberInterface, BlockLoaderInterface {
+
+  /**
+   * The database connection.
+   *
+   * @var \Drupal\Core\Database\Connection
+   */
+  protected $database;
+
+  /**
+   * The shared temp store factory.
+   *
+   * @var \Drupal\user\SharedTempStoreFactory
+   */
+  protected $tempStore;
+
+  public function __construct(Connection $database, SharedTempStoreFactory $temp_store) {
+    $this->database = $database;
+    $this->tempStore = $temp_store;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getSubscribedEvents() {
+    return [
+      BlockVariantEvents::ADD_BLOCK => 'onBlockAdd',
+      BlockVariantEvents::DELETE_BLOCK => 'onBlockDelete',
+    ];
+  }
+
+  /**
+   * Reacts when a block is added to a Panels variant.
+   *
+   * @param \Drupal\ctools\Event\BlockVariantEvent $event
+   *   The event object.
+   */
+  public function onBlockAdd(BlockVariantEvent $event) {
+    $variant = $event->getVariant();
+    $block = $event->getBlock();
+
+    if ($variant instanceof PanelsDisplayVariant && $block->getBaseId() == 'inline_block') {
+      /** @var \Drupal\ctools_inline_block\Plugin\Block\InlineBlock $block */
+      $this->database
+        ->insert('inline_block')
+        ->fields([
+          'uuid' => $block->getEntity()->uuid(),
+          'service_id' => $this->_serviceId,
+          'arguments' => serialize([
+            $variant->getTempStoreId(),
+          ]),
+        ])
+        ->execute();
+    }
+  }
+
+  /**
+   * Reacts when a block is removed from a Panels variant.
+   *
+   * @param \Drupal\ctools\Event\BlockVariantEvent $event
+   *   The event object.
+   */
+  public function onBlockDelete(BlockVariantEvent $event) {
+    $variant = $event->getVariant();
+    $block = $event->getBlock();
+
+    if ($variant instanceof PanelsDisplayVariant && $block->getBaseId() == 'inline_block') {
+      /** @var \Drupal\ctools_inline_block\Plugin\Block\InlineBlock $block */
+      $this->database
+        ->delete('inline_block')
+        ->condition('uuid', $block->getEntity()->uuid())
+        ->execute();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function load($uuid, array $arguments = []) {
+    $cached_values = $this->tempStore
+      ->get('inline_block')
+      ->get($arguments[0]);
+
+    $configuration = $cached_values['blocks'][$uuid];
+    if (!empty($configuration['entity'])) {
+      return unserialize($configuration['entity']);
+    }
+    return NULL;
+  }
+
+}
