diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index d2f860a88b86268c29786416c56f01a7ba6aa025..19edb5650ba88274fb1a28f3dc9199c9590a5acc 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -198,7 +198,6 @@ class SimpleSAML_XHTML_Template
 
         $twig = new Twig_Environment($loader, $options);
         $twig->addExtension(new Twig_Extensions_Extension_I18n());
-        SimpleSAML\Module::callHooks('twigInit', $twig);
         return $twig;
     }
 
@@ -476,6 +475,17 @@ class SimpleSAML_XHTML_Template
     }
 
 
+    /**
+     * Get the current instance of Twig in use.
+     *
+     * @return false|Twig_Environment The Twig instance in use, or false if Twig is not used.
+     */
+    public function getTwig()
+    {
+        return $this->twig;
+    }
+
+
     /*
      * Deprecated methods of this interface, all of them should go away.
      */