diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 551e3cb..bc3de1d 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -77,6 +77,7 @@ public function getFunctions() {
       new \Twig_SimpleFunction('url_from_path', array($this, 'getUrlFromPath'), array('is_safe_callback' => array($this, 'isUrlGenerationSafe'))),
       new \Twig_SimpleFunction('link', array($this, 'getLink')),
       new \Twig_SimpleFunction('file_url', 'file_create_url'),
+      new \Twig_SimpleFunction('active_theme_path', array($this, 'activeThemePath')),
     );
   }
 
@@ -257,4 +258,14 @@ public function isUrlGenerationSafe(\Twig_Node $args_node) {
     return array();
   }
 
+  /**
+   * Gets the path of the active theme.
+   *
+   * @return string
+   *   The path to the active theme.
+   */
+  public function activeThemePath() {
+    return \Drupal::service('theme.manager')->getActiveTheme()->getPath();
+  }
+
 }
diff --git a/core/modules/system/src/Tests/Theme/EngineTwigTest.php b/core/modules/system/src/Tests/Theme/EngineTwigTest.php
index 750ae2e..8f10303 100644
--- a/core/modules/system/src/Tests/Theme/EngineTwigTest.php
+++ b/core/modules/system/src/Tests/Theme/EngineTwigTest.php
@@ -111,4 +111,13 @@ public function testTwigFileUrls() {
     $this->assertRaw('<div>file_url: ' . $filepath . '</div>');
   }
 
+  /**
+   * Tests the active_theme_path() function.
+   */
+  public function testActiveThemePath() {
+    $this->drupalGet('/twig-theme-test/active_theme_path');
+    $theme_path = \Drupal::service('theme.manager')->getActiveTheme()->getPath();
+    $this->assertRaw('<div>active theme path: ' . $theme_path . '</div>');
+  }
+
 }
diff --git a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php
index ff49bd6..0155291 100644
--- a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php
+++ b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php
@@ -75,4 +75,11 @@ public function registryLoaderRender() {
     return array('#theme' => 'twig_registry_loader_test');
   }
 
+  /**
+   * Menu callback for testing the active theme path function.
+   */
+  public function activeThemePathRender() {
+    return array('#theme' => 'twig_theme_test_active_theme_path');
+  }
+
 }
diff --git a/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.active_theme_path.html.twig b/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.active_theme_path.html.twig
new file mode 100644
index 0000000..a52e326
--- /dev/null
+++ b/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.active_theme_path.html.twig
@@ -0,0 +1 @@
+<div>active theme path: {{ active_theme_path() }}</div>
diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module
index 7f6fe35..7cf0453 100644
--- a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module
+++ b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module
@@ -50,6 +50,10 @@ function twig_theme_test_theme($existing, $type, $theme, $path) {
     'variables' => array(),
     'template' => 'twig_theme_test.file_url',
   );
+  $items['twig_theme_test_active_theme_path'] = array(
+    'variables' => array(),
+    'template' => 'twig_theme_test.active_theme_path',
+  );
   return $items;
 }
 
diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml
index 1001b47..236bfd0 100644
--- a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml
+++ b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml
@@ -46,3 +46,10 @@ twig_theme_test_registry_loader:
     _controller: '\Drupal\twig_theme_test\TwigThemeTestController::registryLoaderRender'
   requirements:
     _access: 'TRUE'
+
+twig_theme_test_active_theme_path:
+  path: '/twig-theme-test/active_theme_path'
+  defaults:
+    _controller: '\Drupal\twig_theme_test\TwigThemeTestController::activeThemePathRender'
+  requirements:
+    _access: 'TRUE'
