diff --git a/mollom.module b/mollom.module
index 7c6b9c0..b425f11 100644
--- a/mollom.module
+++ b/mollom.module
@@ -1208,6 +1208,10 @@ function _mollom_status($reset = FALSE) {
   if ($status['keys'] && $reset) {
     $status['keys valid'] = mollom('mollom.verifyKey', _mollom_get_version());
   }
+  // Otherwise, if there are no keys, they cannot be valid.
+  elseif (!$status['keys']) {
+    $status['keys valid'] = FALSE;
+  }
 
   // In case of an error, indicate whether we have a non-empty server list.
   if ($status['keys valid'] !== TRUE) {
diff --git a/tests/mollom.test b/tests/mollom.test
index 06b82ff..ca3c213 100644
--- a/tests/mollom.test
+++ b/tests/mollom.test
@@ -850,6 +850,19 @@ class MollomInstallationTestCase extends MollomWebTestCase {
     // Verify presence of testing mode warning.
     $this->drupalGet('admin/config/content/mollom');
     $this->assertText('Mollom testing mode is still enabled.');
+
+    // Verify that deleting keys throws the correct error message again.
+    $this->drupalGet('admin/config/content/mollom/settings');
+    $this->assertText('The services are operating correctly.');
+    $edit = array(
+      'mollom_public_key' => '',
+      'mollom_private_key' => '',
+    );
+    $this->drupalPost(NULL, $edit, t('Save configuration'));
+    $this->assertText(t('The configuration options have been saved.'));
+    $this->assertNoText('The services are operating correctly.');
+    $this->assertText('The Mollom API keys are not configured yet.');
+    $this->assertNoText('The configured Mollom API keys are invalid.');
   }
 }
 
