diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
index d225150..42ac626 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAutocompleteTest.php
@@ -46,5 +46,11 @@ function testUserAutocomplete() {
 
     // Using first letter of the user's name, make sure the user's full name is in the results.
     $this->assertRaw($this->unprivileged_user->name, 'User name found in autocompletion results.');
+
+    // Using anonymous user's name, make sure it's in the result.
+    $anonymous_name = $this->randomName();
+    config('user')->set('anonymous', $anonymous_name)->save();
+    $this->drupalGet('user/autocomplete/' . drupal_substr($anonymous_name, 0, 4));
+    $this->assertRaw($anonymous_name, 'The anonymous name found in autocompletion results.');
   }
 }
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 127a3af..cf9c655 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -17,6 +17,11 @@
 function user_autocomplete() {
   $matches = array();
   if ($string = drupal_container()->get('request')->query->get('q')) {
+    $anonymous_name = config('user')->get('anonymous');
+    // Allow to autocomplete for the anonymous user.
+    if (stripos($anonymous_name, $string) !== FALSE) {
+      $matches[$anonymous_name] = $anonymous_name;
+    }
     $result = db_select('users')->fields('users', array('name'))->condition('name', db_like($string) . '%', 'LIKE')->range(0, 10)->execute();
     foreach ($result as $account) {
       $matches[$account->name] = check_plain($account->name);
