diff --git a/src/Plugin/Block/MenuBlock.php b/src/Plugin/Block/MenuBlock.php
index 5a1b471..da1ce14 100644
--- a/src/Plugin/Block/MenuBlock.php
+++ b/src/Plugin/Block/MenuBlock.php
@@ -42,6 +42,13 @@ class MenuBlock extends SystemMenuBlock {
       '#description' => $this->t('All menu links that have children will "Show as expanded".'),
     ];
 
+    $form['advanced']['follow'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('<strong>Follow active trail</strong>'),
+      '#default_value' => $config['follow'],
+      '#description' => $this->t('Follow current active trail.'),
+    ];
+
     $menu_name = $this->getDerivativeId();
     $menus = Menu::loadMultiple(array($menu_name));
     $menus[$menu_name] = $menus[$menu_name]->label();
@@ -121,6 +128,7 @@ class MenuBlock extends SystemMenuBlock {
     $this->configuration['depth'] = $form_state->getValue('depth');
     $this->configuration['expand'] = $form_state->getValue('expand');
     $this->configuration['parent'] = $form_state->getValue('parent');
+    $this->configuration['follow'] = $form_state->getValue('follow');
     $this->configuration['suggestion'] = $form_state->getValue('suggestion');
     $this->configuration['label_type'] = $form_state->getValue('label_type');
   }
@@ -137,15 +145,30 @@ class MenuBlock extends SystemMenuBlock {
     $depth = $this->configuration['depth'];
     $expand = $this->configuration['expand'];
     $parent = $this->configuration['parent'];
+    $follow = $this->configuration['follow'];
     $suggestion = $this->configuration['suggestion'];
 
+    $maxDepth = $level + $depth - 1;
     $parameters->setMinDepth($level);
+
+    if ($follow) {
+      $level += count($parameters->activeTrail) - 1;
+      end($parameters->activeTrail);
+      $root_item = current($parameters->activeTrail);
+      if (empty($root_item) && count($parameters->activeTrail) > 1) {
+        $root_item = prev($parameters->activeTrail);
+        $level--;
+      }
+      $parameters->setRoot($root_item);
+      $parameters->setMinDepth(1);
+      $maxDepth = $depth + 1;
+    }
     // When the depth is configured to zero, there is no depth limit. When depth
     // is non-zero, it indicates the number of levels that must be displayed.
     // Hence this is a relative depth that we must convert to an actual
     // (absolute) depth, that may never exceed the maximum depth.
-    if ($depth > 0) {
-      $parameters->setMaxDepth(min($level + $depth - 1, $this->menuTree->maxDepth()));
+    if ($maxDepth > 0) {
+      $parameters->setMaxDepth(min($maxDepth, $this->menuTree->maxDepth()));
     }
 
     // For menu blocks with start level greater than 1, only show menu items
@@ -162,7 +185,7 @@ class MenuBlock extends SystemMenuBlock {
         $parameters->setRoot($menu_root)->setMinDepth(1);
         if ($depth > 0) {
           $parameters->setMaxDepth(
-            min($level - 1 + $depth - 1, $this->menuTree->maxDepth())
+            min($maxDepth - 1, $this->menuTree->maxDepth())
           );
         }
       }
