diff --git a/lib/SimpleSAML/Kernel.php b/lib/SimpleSAML/Kernel.php
index 2127d870d4e4f72652c9ffcf981c2e043b809872..814624af897e8cb79f2d438715805ad090d6d8f3 100644
--- a/lib/SimpleSAML/Kernel.php
+++ b/lib/SimpleSAML/Kernel.php
@@ -136,6 +136,10 @@ class Kernel extends BaseKernel
         $confDir = Module::getModuleDir($this->module) . '/routing/routes';
         if (is_dir($confDir)) {
             $routes->import($confDir . '/**/*' . self::CONFIG_EXTS, $this->module, 'glob');
+        } else {
+            // Remain backwards compatible by checking for routers in the old location (1.18 style)
+            $confDir = Module::getModuleDir($this->module);
+            $routes->import($confDir . '/routes' . self::CONFIG_EXTS, $this->module, 'glob');
         }
     }