diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php
index fb5d8fd4baaff0afc6b5c812647eaed2e8124b19..0eb55b7bc4ce21d5aff06d7a3562669b563eca9f 100644
--- a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php
+++ b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php
@@ -107,6 +107,11 @@ class SimpleSAML_Bindings_SAML20_HTTPPost {
 			$signResponse = $this->configuration->getBoolean('saml20.signresponse', FALSE);
 		}
 
+		/* Check if we have an assertion to sign. Force to sign the response if not. */
+		if($firstassertionroot === NULL) {
+			$signResponse = TRUE;
+		}
+
 		if($signResponse) {
 			/* Sign the response. */