diff --git a/search_api_xapian/includes/SearchApiSpellcheckXapian.inc b/search_api_xapian/includes/SearchApiSpellcheckXapian.inc
new file mode 100644
index 0000000..6311ac7
--- /dev/null
+++ b/search_api_xapian/includes/SearchApiSpellcheckXapian.inc
@@ -0,0 +1,35 @@
+<?php
+/**
+ * @file
+ * Class SearchApiSpellcheckXapian
+ * Makes Xapian suggested query string available to the search_api_spellcheck
+ * module which can use it to offer spelling suggestions.
+ */
+
+class SearchApiSpellcheckXapian extends SearchApiSpellcheck {
+
+  /**
+   * Constructor
+   * @param string $keys
+   * @param string $suggestion
+   */
+  function __construct($keys, $suggestion = NULL) {
+    if ($suggestion) {
+      $keys = $this->_readableStringFromQuery($keys);
+      $suggestion = $this->_readableStringFromQuery($suggestion);
+      $s = new SearchApiSpellcheckSuggestion($keys, $suggestion);
+      $this->addSuggestion($s);
+    }
+  }
+
+  /**
+   * Xapian returns a suggested query in a rich format like ((key)). This
+   * helper strips away everything except the words.
+   */
+  function _readableStringFromQuery($query) {
+    $remove = array('(', ')', 'AND', 'OR');
+    $string = str_replace($remove, ' ', $query);
+    $string = preg_replace('/\s+/', ' ', $string);
+    return trim($string);
+  }
+}
diff --git a/search_api_xapian/search_api_xapian.info b/search_api_xapian/search_api_xapian.info
index a567a87..4585b56 100644
--- a/search_api_xapian/search_api_xapian.info
+++ b/search_api_xapian/search_api_xapian.info
@@ -7,4 +7,5 @@ dependencies[] = search_api
 
 files[] = search_api_xapian.install
 files[] = search_api_xapian.module
+files[] = includes/SearchApiSpellcheckXapian.inc
 files[] = service.inc
diff --git a/search_api_xapian/service.inc b/search_api_xapian/service.inc
index 4f37d26..5f219df 100644
--- a/search_api_xapian/service.inc
+++ b/search_api_xapian/service.inc
@@ -60,6 +60,22 @@ abstract class SearchApiAbstractXapianService extends SearchApiAbstractService {
   protected $stemmer = NULL;
 
   /**
+   * Determines whether this service class implementation supports a given
+   * feature. Features are optional extensions to Search API functionality and
+   * usually defined and used by third-party modules.
+   *
+   * @param string $feature
+   *   The name of the optional feature.
+   *
+   * @return boolean
+   *   TRUE if this service knows and supports the specified feature. FALSE
+   *   otherwise.
+   */
+  public function supportsFeature($feature) {
+    return $feature == 'search_api_spellcheck';
+  }
+
+  /**
    * Helper to get the right xapian database object.
    *
    * @param boolean $writable
@@ -105,6 +121,10 @@ abstract class SearchApiAbstractXapianService extends SearchApiAbstractService {
     if (!is_object($this->indexer)) {
       try {
         $this->indexer = new XapianTermGenerator();
+        // Let the indexer know to generate spelling suggestions
+        $this->indexer->set_flags(XapianTermGenerator::FLAG_SPELLING);
+        // To generate spelling suggestions the indexer must have the database
+        $this->indexer->set_database($this->getDatabase(TRUE));
       }
       catch (Exception $e) {
         watchdog('search_api_xapian', t('An error occurred getting the indexer: !msg.', array('!msg' => $e->getMessage())));
@@ -433,6 +453,7 @@ abstract class SearchApiAbstractXapianService extends SearchApiAbstractService {
       // 1. Prepare the search
       $preprocess_start = microtime(TRUE);
       $keys = $query->getKeys();
+      $options = $query->getOptions();
       $stemmer = $this->getStemmer();
       $database = $this->getDatabase();
       $operator = $this->getDefaultQueryOperator($query);
@@ -448,6 +469,15 @@ abstract class SearchApiAbstractXapianService extends SearchApiAbstractService {
       // avoid FLAG_DEFAULT to support versions less than 1.0.11
       // maybe convert this into an option in the future or autodetect to provide a best attempt
       $parser_options = XapianQueryParser::FLAG_PHRASE | XapianQueryParser::FLAG_BOOLEAN | XapianQueryParser::FLAG_LOVEHATE | XapianQueryParser::FLAG_PURE_NOT;
+
+      /**
+       * If the option is set then include a flag to look for spelling
+       * suggestions.
+       */
+      if (!empty($options['search_api_spellcheck'])) {
+        $parser_options = $parser_options | XapianQueryParser::FLAG_SPELLING_CORRECTION;
+      }
+
       $real_query = $query_parser->parse_query($keys, $parser_options);
       $start = $query->getOption('offset') === NULL ? 0 : $query->getOption('offset');
       // a lenght = 0 gives us an empty MSet with valid statistics calculated
@@ -480,6 +510,11 @@ abstract class SearchApiAbstractXapianService extends SearchApiAbstractService {
       }
       $postprocessing_end = microtime(TRUE);
 
+      // Processes any spellcheck suggestions
+      if (module_exists('search_api_spellcheck') && !empty($options['search_api_spellcheck'])) {
+        $results['search_api_spellcheck'] = new SearchApiSpellcheckXapian($keys, $query_parser->get_corrected_query_string());
+      }
+
       // Compute performance
       $end_time = microtime(TRUE);
       $results['performance'] = array(
