diff --git a/includes/common.inc b/includes/common.inc
index d64be82..457f2d4 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5647,6 +5647,16 @@ function drupal_render(&$elements) {
     }
   }
 
+  // Make any changes to the element or the rendered children before it is
+  // passed to #theme_wrappers.
+  if (isset($elements['#pre_theme_wrappers'])) {
+    foreach ($elements['#pre_theme_wrappers'] as $function) {
+      if (function_exists($function)) {
+        $elements = $function($elements);
+      }
+    }
+  }
+
   // Let the theme functions in #theme_wrappers add markup around the rendered
   // children.
   if (isset($elements['#theme_wrappers'])) {
diff --git a/includes/theme.inc b/includes/theme.inc
index bea87c0..d2f62fa 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1510,6 +1510,23 @@ function theme_link($variables) {
 }
 
 /**
+ * Converts rendered sub-elements of #type 'links' into #items.
+ */
+function drupal_pre_theme_wrap_links($elements) {
+  foreach (element_children($elements) as $key) {
+    // Children are only rendered if the current user has access.
+    if (isset($elements[$key]['#children'])) {
+      $elements['#items'][$key] = $elements[$key]['#children'];
+    }
+  }
+  // 'type' is most probably the most stupid theme variable ever.
+  // @todo Fix theme_item_list() to use 'tag' instead of 'type'.
+  $elements['#type'] = $elements['#tag'];
+
+  return $elements;
+}
+
+/**
  * Returns HTML for a set of links.
  *
  * @param $variables
diff --git a/modules/node/node.module b/modules/node/node.module
index 0c3cfb7..4b0aad1 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2590,6 +2590,20 @@ function node_page_default() {
       '#prefix' => '<div id="first-time">',
       '#suffix' => '</div>',
     );
+    $build['links'] = array(
+      '#type' => 'links',
+    );
+    $build['links']['foo'] = array(
+      '#type' => 'link',
+      '#title' => t('Foo (last)'),
+      '#href' => 'foo',
+      '#weight' => 10,
+    );
+    $build['links']['bar'] = array(
+      '#type' => 'link',
+      '#title' => t('Bar'),
+      '#href' => 'bar',
+    );
   }
   return $build;
 }
diff --git a/modules/system/system.module b/modules/system/system.module
index 0ef688e..17a8928 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -471,6 +471,13 @@ function system_element_info() {
     '#markup' => '',
     '#pre_render' => array('drupal_pre_render_markup'),
   );
+  $types['links'] = array(
+    '#pre_theme_wrappers' => array('drupal_pre_theme_wrap_links'),
+    // Using a key to allow for easy access to add a theme sub-pattern.
+    '#theme_wrappers' => array('links' => 'item_list'),
+    '#tag' => 'ul',
+    '#attributes' => array('class' => array('links', 'inline')),
+  );
   $types['link'] = array(
     '#pre_render' => array('drupal_pre_render_link', 'drupal_pre_render_markup'),
   );
