diff --git a/modules/saml/docs/sp.md b/modules/saml/docs/sp.md
index 2d6271d77d0f4a7e5452280ff79e8850f776cf39..afc10630216dd3361516abfda87f78144c4f86f5 100644
--- a/modules/saml/docs/sp.md
+++ b/modules/saml/docs/sp.md
@@ -53,6 +53,10 @@ All these parameters override the equivalent option from the configuration.
 :   The samlp:Extensions that will be sent in the login request.
 
 
+`saml:logout:Extensions`
+:   The samlp:Extensions that will be sent in the logout request.
+
+
 `saml:NameID`
 :   Add a Subject element with a NameID to the SAML AuthnRequest for the IdP.
     This must be a \SAML2\XML\saml\NameID object.
diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index a9e4c89b21954024b64b63e422af15682e712d8c..95ac6c55f3c47ee54eaa80f7c1ef2d84831d8764 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -977,6 +977,12 @@ class SP extends \SimpleSAML\Auth\Source
         $lr->setRelayState($id);
         $lr->setDestination($endpoint['Location']);
 
+        if (isset($state['saml:logout:Extensions']) && count($state['saml:logout:Extensions']) > 0) {
+            $lr->setExtensions($state['saml:logout:Extensions']);
+        } elseif ($this->metadata->getArray('saml:logout:Extensions', null) !== null) {
+            $lr->setExtensions($this->metadata->getArray('saml:logout:Extensions'));
+        }
+
         $encryptNameId = $idpMetadata->getBoolean('nameid.encryption', null);
         if ($encryptNameId === null) {
             $encryptNameId = $this->metadata->getBoolean('nameid.encryption', false);