diff --git a/apachesolr.api.php b/apachesolr.api.php
index da75d8b..e4936ee 100644
--- a/apachesolr.api.php
+++ b/apachesolr.api.php
@@ -193,3 +193,14 @@ function hook_apachesolr_search_page_alter(&$build, $search_page) {
   $info = array('#markup' => t('Add information to every search page'));
   array_unshift($build, $info);
 }
+
+/**
+ * Modify the returned spellings suggestions. The environment is available
+ * as an argument so the search query can be retrieved if necessary
+ *
+ * @param array $suggestions
+ * @param string $env_id
+ */
+function hook_apachesolr_suggestions_alter(&$suggestions, $env_id) {
+  // Modify the suggestions here
+}
diff --git a/apachesolr_search.module b/apachesolr_search.module
index 60c324b..935a59e 100644
--- a/apachesolr_search.module
+++ b/apachesolr_search.module
@@ -850,11 +850,14 @@ function apachesolr_search_get_search_suggestions() {
     // Get spellchecker suggestions into an array.
     if (!empty($response->spellcheck->suggestions)) {
       $suggestions = get_object_vars($response->spellcheck->suggestions);
+      drupal_alter('apachesolr_suggestions', $suggestions, $env_id);
       if ($suggestions) {
         $replacements = array();
         // Get the original query and retrieve all words with suggestions.
         foreach ($suggestions as $word => $value) {
-          $replacements[$word] = $value->suggestion[0];
+          // We need to check if it's an object as setting the spellcheck.extendedResults query parameter to true makes words
+          // objects instead of strings.
+          $replacements[$word] = is_object($value->suggestion[0]) ? $value->suggestion[0]->word : $value->suggestion[0];
         }
         // Replace the keyword with the suggested keyword.
         $suggested_keyword = strtr($keyword, $replacements);
