diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 4c497ba..ce68f2a 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -142,13 +142,15 @@ function pager_get_query_parameters() {
 }
 
 /**
- * Returns HTML for a query pager.
+ * Prepares variables for pager templates.
+ *
+ * Default template: pager.html.twig.
  *
  * Menu callbacks that display paged query results should call theme('pager') to
  * retrieve a pager control so that users can view other results. Format a list
  * of nearby pages with additional query results.
  *
- * @param $variables
+ * @param array $variables
  *   An associative array containing:
  *   - tags: An array of labels for the controls in the pager.
  *   - element: An optional integer to distinguish between multiple pagers on
@@ -156,16 +158,29 @@ function pager_get_query_parameters() {
  *   - parameters: An associative array of query string parameters to append to
  *     the pager links.
  *   - quantity: The number of pages in the list.
- *
- * @ingroup themeable
  */
-function theme_pager($variables) {
+function template_preprocess_pager(&$variables) {
   $tags = $variables['tags'];
   $element = $variables['element'];
   $parameters = $variables['parameters'];
   $quantity = $variables['quantity'];
   global $pager_page_array, $pager_total;
 
+  // Nothing to do if there is only one page.
+  if ($pager_total[$element] <= 1) {
+    return;
+  }
+
+  // Fill in default link labels.
+  $tags = &$variables['tags'];
+  $tags += array(
+    t('« first'),
+    t('‹ previous'),
+    '',
+    t('next ›'),
+    t('last »'),
+  );
+
   // Calculate various markers within this pager piece:
   // Middle is used to "center" pages around the current page.
   $pager_middle = ceil($quantity / 2);
@@ -197,54 +212,79 @@ function theme_pager($variables) {
   $li_previous = '';
   $li_next = '';
   $li_last = '';
+  $current_path = current_path();
 
   // Create the "first" and "previous" links if we are not on the first page.
   if ($pager_page_array[$element] > 0) {
-    $li_first = theme('pager_link__first', array(
-      'text' => (isset($tags[0]) ? $tags[0] : t('« first')),
-      'page_new' => pager_load_array(0, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'first'),
-    ));
-    $li_previous = theme('pager_link__previous', array(
-      'text' => isset($tags[1]) ? $tags[1] : t('‹ previous'),
-      'page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'prev'),
-    ));
+    $li_first = array(
+      '#theme' => 'link__pager__first',
+      '#text' => $tags[0],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, 0),
+        'attributes' => array(
+          'title' => t('Go to first page'),
+          'rel' => 'first',
+        ),
+      ),
+    );
+    $li_previous = array(
+      '#theme' => 'link__pager__previous',
+      '#text' => $tags[1],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to previous page'),
+          'rel' => 'prev',
+        ),
+      ),
+    );
   }
 
   // Create the "last" and "next" links if we are not on the last page.
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
-    $li_next = theme('pager_link__next', array(
-      'text' => isset($tags[3]) ? $tags[3] : t('next ›'),
-      'page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'next'),
-    ));
-    $li_last = theme('pager_link__last', array(
-      'text' => (isset($tags[4]) ? $tags[4] : t('last »')),
-      'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array),
-      'element' => $element,
-      'parameters' => $parameters,
-      'attributes' => array('rel' => 'last'),
-    ));
+    $li_next = array(
+      '#theme' => 'link__pager__next',
+      '#text' => $tags[3],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1),
+        'attributes' => array(
+          'title' => t('Go to next page'),
+          'rel' => 'next',
+        ),
+      ),
+    );
+    $li_last = array(
+      '#theme' => 'link__pager__last',
+      '#text' => $tags[4],
+      '#path' => $current_path,
+      '#element' => $element,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_total[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to last page'),
+          'rel' => 'last',
+        ),
+      ),
+    );
   }
 
   if ($pager_total[$element] > 1) {
     if ($li_first) {
       $items[] = array(
         '#wrapper_attributes' => array('class' => array('pager-first')),
-        '#markup' => $li_first,
+        'link' => $li_first,
       );
     }
     if ($li_previous) {
       $items[] = array(
         '#wrapper_attributes' => array('class' => array('pager-previous')),
-        '#markup' => $li_previous,
+        'link' => $li_previous,
       );
     }
 
@@ -261,13 +301,21 @@ function theme_pager($variables) {
         if ($i < $pager_current) {
           $items[] = array(
             '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($pager_current - $i),
-              'parameters' => $parameters,
-            )),
+            'link' => array(
+              '#theme' => 'link__pager',
+              '#text' => $i,
+              '#path' => $current_path,
+              '#options' => array(
+                'query' => pager_query_add_page($parameters, $element, $i - 1),
+                'attributes' => array(
+                  'title' => t('Go to page @number', array('@number' => $i)),
+                ),
+              ),
+              '#element' => $element,
+              // Specify how many pages are between this item and the current page.
+              // Ignored by default, supplied for alternative implementations.
+              '#interval' => ($pager_current - $i),
+            ),
           );
         }
         if ($i == $pager_current) {
@@ -279,16 +327,25 @@ function theme_pager($variables) {
         if ($i > $pager_current) {
           $items[] = array(
             '#wrapper_attributes' => array('class' => array('pager-item')),
-            '#markup' => theme('pager_link', array(
-              'text' => $i,
-              'page_new' => pager_load_array($i - 1, $element, $pager_page_array),
-              'element' => $element,
-              'interval' => ($i - $pager_current),
-              'parameters' => $parameters,
-            )),
+            'link' => array(
+              '#theme' => 'link__pager',
+              '#text' => $i,
+              '#path' => $current_path,
+              '#options' => array(
+                'query' => pager_query_add_page($parameters, $element, $i - 1),
+                'attributes' => array(
+                  'title' => t('Go to page @number', array('@number' => $i)),
+                ),
+              ),
+              '#element' => $element,
+              // Specify how many pages are between this item and the current page.
+              // Ignored by default, supplied for alternative implementations.
+              '#interval' => ($i - $pager_current),
+            ),
           );
         }
       }
+      // Check whether there are further next pages.
       if ($i < $pager_max) {
         $items[] = array(
           '#wrapper_attributes' => array('class' => array('pager-ellipsis')),
@@ -300,84 +357,55 @@ function theme_pager($variables) {
     if ($li_next) {
       $items[] = array(
         '#wrapper_attributes' => array('class' => array('pager-next')),
-        '#markup' => $li_next,
+        'link' => $li_next,
       );
     }
     if ($li_last) {
       $items[] = array(
         '#wrapper_attributes' => array('class' => array('pager-last')),
-        '#markup' => $li_last,
+        'link' => $li_last,
       );
     }
-    return '<h2 class="element-invisible">' . t('Pages') . '</h2>' . theme('item_list', array(
-      'items' => $items,
-      'attributes' => array('class' => array('pager')),
-    ));
+
+    $variables['items'] = array(
+      '#theme' => 'item_list',
+      '#items' => $items,
+      '#attributes' => array('class' => array('pager')),
+    );
   }
 }
 
 /**
- * Returns HTML for a link to a specific query result page.
+ * Adds the 'page' parameter to the query parameter array of a pager link.
  *
- * @param $variables
- *   An associative array containing:
- *   - text: The link text. Also used to figure out the title attribute of the
- *     link, if it is not provided in $variables['attributes']['title']; in
- *     this case, $variables['text'] must be one of the standard pager link
- *     text strings that would be generated by the pager theme functions, such
- *     as a number or t('« first').
- *   - page_new: The first result to display on the linked page.
- *   - element: An optional integer to distinguish between multiple pagers on
- *     one page.
- *   - parameters: An associative array of query string parameters to append to
- *     the pager link.
- *   - attributes: An associative array of HTML attributes to apply to the
- *     pager link.
+ * @param array $query
+ *   An associative array of query parameters to add to.
+ * @param integer $element
+ *   An integer to distinguish between multiple pagers on one page.
+ * @param integer $index
+ *   The index of the target page in the pager array.
  *
- * @see theme_pager()
+ * @return array
+ *   The altered $query parameter array.
  *
- * @ingroup themeable
+ * @todo Document the pager/element/index architecture and logic. It is not
+ *   clear what is happening in this function as well as pager_load_array(),
+ *   and whether this can be simplified in any way.
  */
-function theme_pager_link($variables) {
-  $text = $variables['text'];
-  $page_new = $variables['page_new'];
-  $element = $variables['element'];
-  $parameters = $variables['parameters'];
-  $attributes = $variables['attributes'];
+function pager_query_add_page(array $query, $element, $index) {
+  global $pager_page_array;
+
+  // Determine the first result to display on the linked page.
+  $page_new = pager_load_array($index, $element, $pager_page_array);
 
   $page = isset($_GET['page']) ? $_GET['page'] : '';
   if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
-    $parameters['page'] = $new_page;
-  }
-
-  $query = array();
-  if (count($parameters)) {
-    $query = drupal_get_query_parameters($parameters, array());
+    $query['page'] = $new_page;
   }
   if ($query_pager = pager_get_query_parameters()) {
     $query = array_merge($query, $query_pager);
   }
-
-  // Set each pager link title
-  if (!isset($attributes['title'])) {
-    static $titles = NULL;
-    if (!isset($titles)) {
-      $titles = array(
-        t('« first') => t('Go to first page'),
-        t('‹ previous') => t('Go to previous page'),
-        t('next ›') => t('Go to next page'),
-        t('last »') => t('Go to last page'),
-      );
-    }
-    if (isset($titles[$text])) {
-      $attributes['title'] = $titles[$text];
-    }
-    elseif (is_numeric($text)) {
-      $attributes['title'] = t('Go to page @number', array('@number' => $text));
-    }
-  }
-
-  return l($text, current_path(), array('query' => $query, 'attributes' => $attributes));
+  return $query;
 }
 
 /**
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 0347dbe..15bb7df 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -3211,21 +3211,7 @@ function drupal_common_theme() {
     // From pager.inc.
     'pager' => array(
       'variables' => array('tags' => array(), 'element' => 0, 'parameters' => array(), 'quantity' => 9),
-    ),
-    'pager_first' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'parameters' => array()),
-    ),
-    'pager_previous' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()),
-    ),
-    'pager_next' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()),
-    ),
-    'pager_last' => array(
-      'variables' => array('text' => NULL, 'element' => 0, 'parameters' => array()),
-    ),
-    'pager_link' => array(
-      'variables' => array('text' => NULL, 'page_new' => NULL, 'element' => NULL, 'parameters' => array(), 'attributes' => array()),
+      'template' => 'pager',
     ),
     // From menu.inc.
     'menu_link' => array(
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc
index aed41f6..66ebdf2 100644
--- a/core/modules/search/search.pages.inc
+++ b/core/modules/search/search.pages.inc
@@ -96,10 +96,7 @@ function template_preprocess_search_results(&$variables) {
       '#module' => $variables['module'],
     );
   }
-  $variables['pager'] = array(
-    '#theme' => 'pager',
-    '#tags' => NULL,
-  );
+  $variables['pager'] = array('#theme' => 'pager');
   // @todo Revisit where this help text is added, see also
   //   http://drupal.org/node/1918856.
   $variables['help'] = search_help('search#noresults', drupal_help_arg());
diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css
index c67d1a1..adc9b3a 100644
--- a/core/modules/system/css/system.theme.css
+++ b/core/modules/system/css/system.theme.css
@@ -177,7 +177,7 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed {
 }
 
 /**
- * Markup generated by theme_pager().
+ * Markup generated by pager.html.twig.
  */
 .item-list .pager {
   clear: both;
diff --git a/core/modules/system/templates/pager.html.twig b/core/modules/system/templates/pager.html.twig
new file mode 100644
index 0000000..b8274a7
--- /dev/null
+++ b/core/modules/system/templates/pager.html.twig
@@ -0,0 +1,18 @@
+{#
+/**
+ * @file
+ * Default theme implementation to display a pager.
+ *
+ * Available variables:
+ * - items: List of pager items.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_pager()
+ *
+ * @ingroup themeable
+ */
+#}
+{% if items %}
+  <h2 class="element-invisible">{{ 'Pages'|t }}</h2>
+  {{ items }}
+{% endif %}
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index 7c04815..5149547 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -255,7 +255,7 @@ function user_admin_account() {
     '#options' => $options,
     '#empty' => t('No people available.'),
   );
-  $form['pager'] = array('#markup' => theme('pager'));
+  $form['pager'] = array('#theme' => 'pager');
 
   return $form;
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
index 08a5978..b075bed 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Full.php
@@ -82,7 +82,8 @@ public function summaryTitle() {
    */
   function render($input) {
     $pager_theme = views_theme_functions('pager', $this->view, $this->view->display_handler->display);
-    // The 0, 1, 3, 4 index are correct. See theme_pager documentation.
+    // The 0, 1, 3, 4 indexes are correct. See the template_preprocess_pager()
+    // documentation.
     $tags = array(
       0 => $this->options['tags']['first'],
       1 => $this->options['tags']['previous'],
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.php
index 561a2ff..a22eb6c 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.php
@@ -92,7 +92,7 @@ public function postExecute(&$result) {
    * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render().
    */
   function render($input) {
-    // The 1, 3 index are correct, see theme_pager().
+    // The 1, 3 indexes are correct, see template_preprocess_pager().
     $tags = array(
       1 => $this->options['tags']['previous'],
       3 => $this->options['tags']['next'],
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 12cc7cf..e2ab8dd 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -1144,31 +1144,37 @@ function theme_views_mini_pager($vars) {
 
   // Current is the page we are currently paged to.
   $pager_current = $pager_page_array[$element] + 1;
-  // End of marker calculations.
+  $current_path = current_path();
 
   $li_previous = array();
   if ($pager_total[$element] > 1 && $pager_page_array[$element] > 0) {
     $li_previous = array(
-      '#theme' => 'pager_link__previous',
+      '#theme' => 'link__pager__previous',
       '#text' => (isset($tags[1]) ? $tags[1] : t('‹‹')),
-      '#attributes' => array('title' => t('Go to previous page')),
-      '#page_new' => pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array),
-      '#element' => $element,
-      '#interval' => 1,
-      '#parameters' => $parameters,
+      '#path' => $current_path,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1),
+        'attributes' => array(
+          'title' => t('Go to previous page'),
+          'rel' => 'prev',
+        ),
+      ),
     );
   }
 
   $li_next = array();
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
     $li_next = array(
-      '#theme' => 'pager_link__next',
+      '#theme' => 'link__pager__next',
       '#text' => (isset($tags[3]) ? $tags[3] : t('››')),
-      '#attributes' => array('title' => t('Go to next page')),
-      '#page_new' => pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array),
-      '#element' => $element,
-      '#interval' => 1,
-      '#parameters' => $parameters,
+      '#path' => $current_path,
+      '#options' => array(
+        'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1),
+        'attributes' => array(
+          'title' => t('Go to next page'),
+          'rel' => 'next',
+        ),
+      ),
     );
   }
 
@@ -1186,7 +1192,7 @@ function theme_views_mini_pager($vars) {
   ) + $li_next;
 
   $item_list = array(
-    '#theme' => 'item_list',
+    '#theme' => 'item_list__pager',
     '#items' => $items,
     '#title' => NULL,
     '#type' => 'ul',
