diff --git search404.install search404.install
index 5dae296..1106d5d 100644
--- search404.install
+++ search404.install
@@ -24,4 +24,5 @@ function search404_uninstall() {
   variable_del('search404_ignore_query');
   variable_del('search404_ignore_extensions');
   variable_del('search404_use_search_engine');
+  variable_del('search404_drupal_messages');
 }
diff --git search404.module search404.module
index 774f830..60dd1d4 100644
--- search404.module
+++ search404.module
@@ -126,7 +126,9 @@ function search404_page() {
     if ($keys) {
       // TODO: watchdog?
       if (module_exists('search_by_page') && variable_get('search404_do_search_by_page', FALSE)) {
-        drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+        if (variable_get('search404_drupal_messages',TRUE)) {
+          drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+        }
         if (variable_get('search404_redirect_301', false)) {
           drupal_goto ('search_pages/'. $keys , NULL ,NULL , 301);
         }
@@ -144,7 +146,9 @@ function search404_page() {
         // END OF EVIL HAXX!
       }
       elseif (module_exists('google') && user_access('search Google CSE') && variable_get('search404_do_google_cse', FALSE)) {
-        drupal_set_message(t('The page you requested does not exist. For your convenience, a google search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+        if (variable_get('search404_drupal_messages',TRUE)) {
+          drupal_set_message(t('The page you requested does not exist. For your convenience, a google search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+        }
         $_REQUEST['destination'] = 'search/google/'. $keys;
         if (variable_get('search404_redirect_301', false)) {
           drupal_goto ("" , NULL ,NULL , 301);
@@ -157,7 +161,9 @@ function search404_page() {
         $results = module_invoke($type_search, 'search', 'search', $keys);
         if (isset($results) && is_array($results) && count($results) == 1 && variable_get('search404_jump', FALSE)) {
           // First, check to see if there is exactly 1 result
-          drupal_set_message(t('The page you requested does not exist. A search for %keys resulted in this page.', array('%keys' => check_plain($keys))), 'status');
+          if (variable_get('search404_drupal_messages',TRUE)) {
+            drupal_set_message(t('The page you requested does not exist. A search for %keys resulted in this page.', array('%keys' => check_plain($keys))), 'status');
+          }
           // overwrite $_REQUEST['destination'] because it is set by drupal_not_found()
           $_REQUEST['destination'] = 'node/'. $results[0]['node']->nid;
           if (variable_get('search404_redirect_301', false)) {
@@ -168,7 +174,9 @@ function search404_page() {
           }
         }
         elseif (isset($results) && is_array($results) && count($results) > 1 && variable_get('search404_first', FALSE)) {
-          drupal_set_message(t('The page you requested does not exist. A search for %keys resulted in this page.', array('%keys' => check_plain($keys))), 'status');
+          if (variable_get('search404_drupal_messages',TRUE)) {
+            drupal_set_message(t('The page you requested does not exist. A search for %keys resulted in this page.', array('%keys' => check_plain($keys))), 'status');
+          }
           // overwrite $_REQUEST['destination'] because it is set by drupal_not_found()
           $_REQUEST['destination'] = 'node/'. $results[0]['node']->nid;
           if (variable_get('search404_redirect_301', false)) {
@@ -179,7 +187,9 @@ function search404_page() {
           }
         }
         else {
-          drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+          if (variable_get('search404_drupal_messages',TRUE)) {
+            drupal_set_message(t('The page you requested does not exist. For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
+          }
           if (isset($results) && is_array($results) && count($results) > 0) {
             drupal_add_css(drupal_get_path('module', 'search') .'/search.css', 'module', 'all', FALSE);
             // EVIL HAXX!
@@ -235,6 +245,11 @@ function search404_settings() {
     '#title' => t('Jump directly to the first search result even when there are multiple results.'),
     '#default_value' => variable_get('search404_first', FALSE),
   );
+    $form['search404_drupal_messages'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Display a drupal error message when search results are shown on a 404 page.'),
+    '#default_value' => variable_get('search404_drupal_messages', TRUE),
+  );
   //Added for displaying blocks for 404 searches
   $form['search404_block_show'] = array(
     '#type' => 'checkbox',
