diff --git a/search_api_db/src/Plugin/search_api/backend/Database.php b/search_api_db/src/Plugin/search_api/backend/Database.php
index 49ed064..002cd1c 100644
--- a/search_api_db/src/Plugin/search_api/backend/Database.php
+++ b/search_api_db/src/Plugin/search_api/backend/Database.php
@@ -1780,13 +1780,14 @@ class Database extends BackendPluginBase {
           throw new SearchApiException(SafeMarkup::format('Unknown field in filter clause: @field.', array('@field' => $f[0])));
         }
         $field = $fields[$f[0]];
+        $not_equals = $f[2] == '<>' || $f[2] == '!=';
         // Fields have their own table, so we have to check for NULL values in
         // a special way (i.e., check for missing entries in that table).
         // @todo This can probably always use the denormalized table.
         if ($f[1] === NULL) {
           $query = $this->database->select($field['table'], 't')
             ->fields('t', array('item_id'));
-          $cond->condition('t.item_id', $query, $f[2] == '<>' || $f[2] == '!=' ? 'IN' : 'NOT IN');
+          $cond->condition('t.item_id', $query, $not_equals ? 'IN' : 'NOT IN');
           continue;
         }
         if (Utility::isTextType($field['type'])) {
@@ -1804,7 +1805,7 @@ class Database extends BackendPluginBase {
             unset($query_fields);
           }
           unset($query_expressions);
-          $cond->condition('t.item_id', $query, $f[2] == '<>' || $f[2] == '!=' ? 'NOT IN' : 'IN');
+          $cond->condition('t.item_id', $query, $not_equals ? 'NOT IN' : 'IN');
         }
         else {
           $new_join = ($filter->getConjunction() == 'AND' || empty($first_join[$f[0]]));
@@ -1813,13 +1814,22 @@ class Database extends BackendPluginBase {
             $first_join[$f[0]] = TRUE;
           }
           $column = $tables[$f[0]] . '.' . 'value';
-          if ($f[1] !== NULL) {
-            $cond->condition($column, $f[1], $f[2]);
-          }
-          else {
+          if ($f[1] === NULL) {
             $method = ($f[2] == '=') ? 'isNull' : 'isNotNull';
             $cond->$method($column);
           }
+          elseif ($not_equals) {
+            // The situation is more complicated for multi-valued fields, since
+            // we must make sure that results are excluded if ANY of the field's
+            // values equals the one given in this condition.
+            $query = $this->connection->select($field['table'], 't')
+              ->fields('t', array('item_id'))
+              ->condition($field['column'], $f[1]);
+            $cond->condition('t.item_id', $query, 'NOT IN');
+          }
+          else {
+            $cond->condition($column, $f[1], $f[2]);
+          }
         }
       }
     }
diff --git a/search_api_db/src/Tests/BackendTest.php b/search_api_db/src/Tests/BackendTest.php
index 8dfeb4b..a39e629 100644
--- a/search_api_db/src/Tests/BackendTest.php
+++ b/search_api_db/src/Tests/BackendTest.php
@@ -439,11 +439,24 @@ class BackendTest extends EntityUnitTestBase {
     $this->assertIgnored($results);
     $this->assertWarnings($results);
 
-    $results = $this->buildSearch()->condition($this->getFieldId('keywords'), NULL)->execute();
+    $keywords_field = $this->getFieldId('keywords');
+    $results = $this->buildSearch()->condition($keywords_field, 'orange', '<>')->execute();
+    $this->assertEqual($results['result count'], 2, 'Negated filter on multi-valued field returned correct number of results.');
+    $this->assertEqual(array_keys($results['results']), array(3, 4), 'Negated filter on multi-valued field returned correct result.');
+    $this->assertEqual($results['ignored'], array(), 'No keys were ignored.');
+    $this->assertEqual($results['warnings'], array(), 'No warnings were displayed.');
+
+    $results = $this->buildSearch()->condition($keywords_field, NULL)->execute();
     $this->assertEqual($results->getResultCount(), 1, 'Query with NULL filter returned correct number of results.');
     $this->assertEqual(array_keys($results->getResultItems()), $this->getItemIds(array(3)), 'Query with NULL filter returned correct result.');
     $this->assertIgnored($results);
     $this->assertWarnings($results);
+
+    $results = $this->buildSearch()->condition($keywords_field, NULL, '<>')->execute();
+    $this->assertEqual($results['result count'], 4, 'Query with NOT NULL filter returned correct number of results.');
+    $this->assertEqual(array_keys($results['results']), array(1, 2, 4, 5), 'Query with NOT NULL filter returned correct result.');
+    $this->assertEqual($results['ignored'], array(), 'No keys were ignored.');
+    $this->assertEqual($results['warnings'], array(), 'No warnings were displayed.');
   }
 
   /**
@@ -470,10 +483,11 @@ class BackendTest extends EntityUnitTestBase {
     $this->assertWarnings($results);
 
     // Regression tests for #1863672.
+    $keywords_field = $this->getFieldId('keywords');
     $query = $this->buildSearch();
     $filter = $query->createFilter('OR');
-    $filter->condition($this->getFieldId('keywords'), 'orange');
-    $filter->condition($this->getFieldId('keywords'), 'apple');
+    $filter->condition($keywords_field, 'orange');
+    $filter->condition($keywords_field, 'apple');
     $query->filter($filter);
     $query->sort($this->getFieldId('id'), 'ASC');
     $results = $query->execute();
@@ -484,12 +498,12 @@ class BackendTest extends EntityUnitTestBase {
 
     $query = $this->buildSearch();
     $filter = $query->createFilter('OR');
-    $filter->condition($this->getFieldId('keywords'), 'orange');
-    $filter->condition($this->getFieldId('keywords'), 'strawberry');
+    $filter->condition($keywords_field, 'orange');
+    $filter->condition($keywords_field, 'strawberry');
     $query->filter($filter);
     $filter = $query->createFilter('OR');
-    $filter->condition($this->getFieldId('keywords'), 'apple');
-    $filter->condition($this->getFieldId('keywords'), 'grape');
+    $filter->condition($keywords_field, 'apple');
+    $filter->condition($keywords_field, 'grape');
     $query->filter($filter);
     $query->sort($this->getFieldId('id'), 'ASC');
     $results = $query->execute();
@@ -501,12 +515,12 @@ class BackendTest extends EntityUnitTestBase {
     $query = $this->buildSearch();
     $filter1 = $query->createFilter('OR');
     $filter = $query->createFilter('AND');
-    $filter->condition($this->getFieldId('keywords'), 'orange');
-    $filter->condition($this->getFieldId('keywords'), 'apple');
+    $filter->condition($keywords_field, 'orange');
+    $filter->condition($keywords_field, 'apple');
     $filter1->filter($filter);
     $filter = $query->createFilter('AND');
-    $filter->condition($this->getFieldId('keywords'), 'strawberry');
-    $filter->condition($this->getFieldId('keywords'), 'grape');
+    $filter->condition($keywords_field, 'strawberry');
+    $filter->condition($keywords_field, 'grape');
     $filter1->filter($filter);
     $query->filter($filter1);
     $query->sort($this->getFieldId('id'), 'ASC');
@@ -724,7 +738,7 @@ class BackendTest extends EntityUnitTestBase {
    * Executes regression tests which are unpractical to run in between.
    */
   protected function regressionTests2() {
-    // Create a "keywords" field on the test entity type.
+    // Create a "prices" field on the test entity type.
     FieldStorageConfig::create(array(
       'field_name' => 'prices',
       'entity_type' => 'entity_test',
