diff --git a/src/Controller/FacetBlockAjaxController.php b/src/Controller/FacetBlockAjaxController.php
index d1d446d..195086c 100644
--- a/src/Controller/FacetBlockAjaxController.php
+++ b/src/Controller/FacetBlockAjaxController.php
@@ -6,13 +6,14 @@ use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\InvokeCommand;
 use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\Core\Controller\ControllerBase;
+use Drupal\Core\Http\RequestStack as DrupalRequestStack;
 use Drupal\Core\Path\CurrentPathStack;
 use Drupal\Core\PathProcessor\PathProcessorManager;
 use Drupal\Core\Render\RendererInterface;
 use Drupal\Core\Routing\CurrentRouteMatch;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\RequestStack;
+use Symfony\Component\HttpFoundation\RequestStack as SymfonyRequestStack;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\Routing\RouterInterface;
 
@@ -126,7 +127,15 @@ class FacetBlockAjaxController extends ControllerBase {
     $facets_blocks = array_unique($facets_blocks);
 
     $new_request = Request::create($path);
-    $request_stack = new RequestStack();
+    // Support 9.3+
+    // @todo remove after 9.3 or greater is required.
+    if (class_exists(DrupalRequestStack::class)) {
+      $request_stack = new DrupalRequestStack();
+    }
+    // Legacy request stack.
+    else {
+      $request_stack = new SymfonyRequestStack();
+    }
     $processed = $this->pathProcessor->processInbound($path, $new_request);
 
     $this->currentPath->setPath($processed);
