diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php
index b477c8a855e1410df61f4c5e058691d85e9a83ab..461f483d1f652db2436e3b7987003c1c30242545 100644
--- a/lib/SimpleSAML/Configuration.php
+++ b/lib/SimpleSAML/Configuration.php
@@ -71,6 +71,14 @@ class SimpleSAML_Configuration
     private $filename = null;
 
 
+    /**
+     * Temporary property that tells if the deprecated getBaseURL() method has been called or not.
+     *
+     * @var bool
+     */
+    private $deprecated_base_url_used = false;
+
+
     /**
      * Initializes a configuration from the given array.
      *
@@ -444,15 +452,37 @@ class SimpleSAML_Configuration
      * @return string The absolute path relative to the root of the website.
      *
      * @throws SimpleSAML\Error\CriticalConfigurationError If the format of 'baseurlpath' is incorrect.
+     *
+     * @deprecated This method will be removed in SimpleSAMLphp 2.0. Please use getBasePath() instead.
      */
     public function getBaseURL()
     {
-        $baseURL = $this->getString('baseurlpath', 'simplesaml/');
-
-        if (preg_match('/^\*(.*)$/D', $baseURL, $matches)) {
+        if (!$this->deprecated_base_url_used) {
+            $this->deprecated_base_url_used = true;
+            SimpleSAML\Logger::warning(
+                "SimpleSAML_Configuration::getBaseURL() is deprecated, please use getBasePath() instead."
+            );
+        }
+        if (preg_match('/^\*(.*)$/D', $this->getString('baseurlpath', 'simplesaml/'), $matches)) {
             // deprecated behaviour, will be removed in the future
             return \SimpleSAML\Utils\HTTP::getFirstPathElement(false).$matches[1];
         }
+        return ltrim($this->getBasePath(), '/');
+    }
+
+
+    /**
+     * Retrieve the absolute path pointing to the SimpleSAMLphp installation.
+     *
+     * The path is guaranteed to start and end with a slash ('/'). E.g.: /simplesaml/
+     *
+     * @return string The absolute path where SimpleSAMLphp can be reached in the web server.
+     *
+     * @throws SimpleSAML\Error\CriticalConfigurationError If the format of 'baseurlpath' is incorrect.
+     */
+    public function getBasePath()
+    {
+        $baseURL = $this->getString('baseurlpath', 'simplesaml/');
 
         if (preg_match('#^https?://[^/]*(?:/(.+/?)?)?$#', $baseURL, $matches)) {
             // we have a full url, we need to strip the path
@@ -462,7 +492,7 @@ class SimpleSAML_Configuration
             }
             return rtrim($matches[1], '/')."/";
         } elseif ($baseURL === '' || $baseURL === '/') {
-            // Root directory of site
+            // root directory of site
             return '';
         } elseif (preg_match('#^/?([^/]?.*/)#D', $baseURL, $matches)) {
             // local path only