diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
index 7137951aa1949da4bd0a340a8c26a5e4b2c3c4eb..95b6ba1d7e7aa7beaa890188eab6e3809c9669c6 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
@@ -86,14 +86,16 @@ public function load() {
   }
 
   /**
-   * Loads entity IDs using a pager.
+   * Loads entity IDs using a pager sorted by the entity id.
    *
    * @return array
    *   An array of entity IDs.
    */
   protected function getEntityIds() {
     $query = $this->getStorage()->getQuery();
+    $keys = $this->entityType->getKeys();
     return $query
+      ->sort($keys['id'])
       ->pager($this->limit)
       ->execute();
   }