diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
index 86ea16706d17fe3aeafddb860a5f3146e3566219..1bc23c5d9c177fb0e4d13201b55b1d4802da6f9e 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
@@ -167,6 +167,16 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 		foreach($this->sources as $source) {
 			$srcList = $source->getMetadataSet($set);
 
+			foreach($srcList AS $key => $le) {
+				if (array_key_exists('expire', $le)) {
+					if ($le['expire'] < time()) {
+						unset($srcList[$key]);
+					}
+				}
+			}
+
+
+
 			/* $result is the last argument to array_merge because we want the content already
 			 * in $result to have precedence.
 			 */