diff --git a/core/authorize.php b/core/authorize.php
index c6ba51d..76b40b1 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -173,5 +173,5 @@ else {
 }
 
 if (!empty($output)) {
-  print theme('update_page', array('content' => $output, 'show_messages' => $show_messages));
+  drupal_deliver_html_page(array('#markup' => $output, '#show_messages' => $show_messages));
 }
diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index 83ddd30..adc2386 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -190,7 +190,7 @@ function _batch_progress_page_nojs() {
     // the error message.
     ob_start();
     $fallback = $current_set['error_message'] . '<br />' . $batch['error_message'];
-    $fallback = theme('maintenance_page', array('content' => $fallback, 'show_messages' => FALSE));
+    $fallback = drupal_render_maintenance_page(array('#markup' => $fallback, '#show_messages' => FALSE, '#maintenance_mode' => 'batch'));
 
     // We strip the end of the page using a marker in the template, so any
     // additional HTML output by PHP shows up inside the page rather than below
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 46caf3e..ffbed2b 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2501,6 +2501,16 @@ function drupal_deliver_html_page($page_callback_result) {
   global $language_interface;
   drupal_add_http_header('Content-Language', $language_interface->langcode);
 
+  // When in maintenance mode, render as a maintenance page.
+  if (defined('MAINTENANCE_MODE')) {
+    if (!is_array($page_callback_result)) {
+      $page_callback_result = array('#markup' => $page_callback_result);
+    }
+    $page_callback_result['#maintenance_mode'] = MAINTENANCE_MODE;
+    print drupal_render_maintenance_page($page_callback_result);
+    return;
+  }
+
   // Menu status constants are integers; page content is a string or array.
   if (is_int($page_callback_result)) {
     // @todo: Break these up into separate functions?
@@ -2570,8 +2580,9 @@ function drupal_deliver_html_page($page_callback_result) {
         drupal_maintenance_theme();
         drupal_add_http_header('Status', '503 Service unavailable');
         drupal_set_title(t('Site under maintenance'));
-        print theme('maintenance_page', array('content' => filter_xss_admin(variable_get('maintenance_mode_message',
-          t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))))));
+        $message = filter_xss_admin(variable_get('maintenance_mode_message',
+          t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))));
+        print drupal_render_maintenance_page(array('#markup' => $message, '#maintenance_mode' => 'site_offline'));
         break;
     }
   }
@@ -5747,6 +5758,49 @@ function drupal_render_page($page) {
 }
 
 /**
+ * Renders a maintenance page.
+ *
+ * This function is the corollary of drupal_render_page() when the site is in
+ * maintenance mode. Unlike in drupal_render_page(), this function does not call
+ * hook_page_build() and hook_page_alter() (drupal_get_region_content() is
+ * called instead as a more limited way of populating the page regions), and
+ * the primary theming is done with theme('maintenance_page') rather than
+ * theme('page').
+ *
+ * @param $element
+ *   A render array containing the content to render in the page's 'content'
+ *   region.
+ *
+ * @return
+ *   A string containing the complete HTML document to return to the browser.
+ */
+function drupal_render_maintenance_page($element) {
+  $page = array(
+    '#type' => 'maintenance_page',
+    'content' => $element,
+  );
+  foreach (array('#show_messages', '#maintenance_mode') as $property) {
+    if (isset($page['content'][$property])) {
+      $page[$property] = $page['content'][$property];
+      unset($page['content'][$property]);
+    }
+  }
+  foreach (drupal_get_region_content() as $region => $region_content) {
+    if (!isset($page[$region])) {
+      $page[$region] = array('#markup' => $region_content);
+    }
+    elseif (!isset($page[$region]['#suffix'])) {
+      $page[$region]['#suffix'] = $region_content;
+    }
+    else {
+      $page[$region]['#suffix'] .= $region_content;
+    }
+  }
+
+  return drupal_render($page);
+}
+
+/**
  * Renders HTML given a structured array tree.
  *
  * Recursively iterates over each of the array elements, generating HTML code.
@@ -6856,15 +6910,9 @@ function drupal_common_theme() {
     ),
     // From theme.maintenance.inc.
     'maintenance_page' => array(
-      'variables' => array('content' => NULL, 'show_messages' => TRUE),
+      'render element' => 'page',
       'template' => 'maintenance-page',
     ),
-    'update_page' => array(
-      'variables' => array('content' => NULL, 'show_messages' => TRUE),
-    ),
-    'install_page' => array(
-      'variables' => array('content' => NULL),
-    ),
     'task_list' => array(
       'variables' => array('items' => NULL, 'active' => NULL),
     ),
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index bfdd712..e83ed46 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -183,13 +183,14 @@ function error_displayable($error = NULL) {
  *   TRUE if the error is fatal.
  */
 function _drupal_log_error($error, $fatal = FALSE) {
+  if ($fatal && !defined('MAINTENANCE_MODE')) {
+    define('MAINTENANCE_MODE', 'error');
+  }
+
   // Initialize a maintenance theme if the boostrap was not complete.
   // Do it early because drupal_set_message() triggers a drupal_theme_initialize().
   if ($fatal && (drupal_get_bootstrap_phase() != DRUPAL_BOOTSTRAP_FULL)) {
     unset($GLOBALS['theme']);
-    if (!defined('MAINTENANCE_MODE')) {
-      define('MAINTENANCE_MODE', 'error');
-    }
     drupal_maintenance_theme();
   }
 
@@ -252,9 +253,7 @@ function _drupal_log_error($error, $fatal = FALSE) {
 
     if ($fatal) {
       drupal_set_title(t('Error'));
-      // We fallback to a maintenance page at this point, because the page generation
-      // itself can generate errors.
-      print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.')));
+      drupal_deliver_html_page(t('The website encountered an unexpected error. Please try again later.'));
       exit;
     }
   }
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 493246c..b5ce2b5 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -731,7 +731,7 @@ function install_display_output($output, $install_state) {
     $active_task = $install_state['installation_finished'] ? NULL : $install_state['active_task'];
     drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task)));
   }
-  print theme('install_page', array('content' => $output));
+  drupal_deliver_html_page(array('#markup' => $output, '#show_messages' => FALSE));
   exit;
 }
 
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index fbb7804..95302f3 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2497,9 +2497,21 @@ function template_preprocess_html(&$variables) {
     }
   }
 
-  // If on an individual node page, add the node type to body classes.
-  if ($node = menu_get_object()) {
-    $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
+  // Add more CSS classes and populate template suggestions based on whether
+  // this is a maintenance page.
+  if (!isset($variables['page']['#maintenance_mode'])) {
+    if ($node = menu_get_object()) {
+      $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
+    }
+    if ($suggestions = theme_get_suggestions(arg(), 'html')) {
+      $variables['theme_hook_suggestions'] = $suggestions;
+    }
+  }
+  else {
+    $variables['classes_array'][] = 'maintenance-mode';
+    $variables['classes_array'][] = drupal_html_class('maintenance-mode-' . $variables['page']['#maintenance_mode']);
+    $variables['theme_hook_suggestions'][] = 'html__maintenance';
+    $variables['theme_hook_suggestions'][] = 'html__maintenance__' . $variables['page']['#maintenance_mode'];
   }
 
   // Initializes attributes which are specific to the html and body elements.
@@ -2532,11 +2544,6 @@ function template_preprocess_html(&$variables) {
   }
   $variables['head_title_array'] = $head_title;
   $variables['head_title'] = implode(' | ', $head_title);
-
-  // Populate the page template suggestions.
-  if ($suggestions = theme_get_suggestions(arg(), 'html')) {
-    $variables['theme_hook_suggestions'] = $suggestions;
-  }
 }
 
 /**
@@ -2549,8 +2556,11 @@ function template_preprocess_html(&$variables) {
  * Uses the arg() function to generate a series of page template suggestions
  * based on the current path.
  *
- * Any changes to variables in this preprocessor should also be changed inside
- * template_preprocess_maintenance_page() to keep all of them consistent.
+ * This function is also called by template_preprocess_maintenance_page(), so
+ * that the same base variables are available to maintenenace-page.tpl.php.
+ * However, module and theme implementations of hook_preprocess_page() are not
+ * automatically called for the maintenance page;
+ * hook_preprocess_maintenance_page() needs to be used instead.
  *
  * @see drupal_render_page()
  * @see template_process_page()
@@ -2581,20 +2591,20 @@ function template_preprocess_page(&$variables) {
   $variables['language']          = $GLOBALS['language_interface'];
   $variables['language']->dir     = $GLOBALS['language_interface']->direction ? 'rtl' : 'ltr';
   $variables['logo']              = theme_get_setting('logo');
-  $variables['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
-  $variables['secondary_menu']    = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
-  $variables['action_links']      = menu_local_actions();
   $variables['site_name']         = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
   $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
-  $variables['tabs']              = menu_local_tabs();
-
-  if ($node = menu_get_object()) {
-    $variables['node'] = $node;
-  }
 
-  // Populate the page template suggestions.
-  if ($suggestions = theme_get_suggestions(arg(), 'page')) {
-    $variables['theme_hook_suggestions'] = $suggestions;
+  if (!isset($variables['page']['#maintenance_mode'])) {
+    $variables['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
+    $variables['secondary_menu']    = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
+    $variables['action_links']      = menu_local_actions();
+    $variables['tabs']              = menu_local_tabs();
+    if ($node = menu_get_object()) {
+      $variables['node'] = $node;
+    }
+    if ($suggestions = theme_get_suggestions(arg(), 'page')) {
+      $variables['theme_hook_suggestions'] = $suggestions;
+    }
   }
 }
 
@@ -2604,11 +2614,17 @@ function template_preprocess_page(&$variables) {
  * Perform final addition of variables before passing them into the template.
  * To customize these variables, simply set them in an earlier step.
  *
+ * This function is also called by template_process_maintenance_page(), so
+ * that the same base variables are available to maintenenace-page.tpl.php.
+ * However, module and theme implementations of hook_process_page() are not
+ * automatically called for the maintenance page;
+ * hook_process_maintenance_page() needs to be used instead.
+ *
  * @see template_preprocess_page()
  * @see page.tpl.php
  */
 function template_process_page(&$variables) {
-  if (!isset($variables['breadcrumb'])) {
+  if (!isset($variables['breadcrumb']) && !isset($variables['page']['#maintenance_mode'])) {
     // Build the breadcrumb last, so as to increase the chance of being able to
     // re-use the cache of an already rendered menu containing the active link
     // for the current page.
@@ -2724,116 +2740,34 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
 }
 
 /**
- * The variables array generated here is a mirror of template_preprocess_page().
- * This preprocessor will run its course when theme_maintenance_page() is
- * invoked.
- *
- * An alternate template file of "maintenance-page--offline.tpl.php" can be
- * used when the database is offline to hide errors and completely replace the
- * content.
- *
- * The $variables array contains the following arguments:
- * - $content
+ * Preprocess variables for maintenance-page.tpl.php
  *
  * @see maintenance-page.tpl.php
+ * @todo Move this to theme.maintenance.inc once theme() allows include files
+ *   for variable processors to reside in a different directory from the default
+ *   template.
  */
 function template_preprocess_maintenance_page(&$variables) {
-  // Add favicon
-  if (theme_get_setting('toggle_favicon')) {
-    $favicon = theme_get_setting('favicon');
-    $type = theme_get_setting('favicon_mimetype');
-    drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => drupal_strip_dangerous_protocols($favicon), 'type' => $type));
-  }
-
-  global $theme;
-  // Retrieve the theme data to list all available regions.
-  $theme_data = list_themes();
-  $regions = $theme_data[$theme]->info['regions'];
-
-  // Get all region content set with drupal_add_region_content().
-  foreach (array_keys($regions) as $region) {
-    // Assign region to a region variable.
-    $region_content = drupal_get_region_content($region);
-    isset($variables[$region]) ? $variables[$region] .= $region_content : $variables[$region] = $region_content;
-  }
+  template_preprocess_page($variables);
 
-  // Setup layout variable.
-  $variables['layout'] = 'none';
-  if (!empty($variables['sidebar_first'])) {
-    $variables['layout'] = 'first';
-  }
-  if (!empty($variables['sidebar_second'])) {
-    $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second';
-  }
-
-  // Construct page title
-  if (drupal_get_title()) {
-    $head_title = array(
-      'title' => strip_tags(drupal_get_title()),
-      'name' => variable_get('site_name', 'Drupal'),
-    );
-  }
-  else {
-    $head_title = array('name' => variable_get('site_name', 'Drupal'));
-    if (variable_get('site_slogan', '')) {
-      $head_title['slogan'] = variable_get('site_slogan', '');
-    }
-  }
-
-  // set the default language if necessary
-  $language = isset($GLOBALS['language_interface']) ? $GLOBALS['language_interface'] : language_default();
-
-  $variables['head_title_array']  = $head_title;
-  $variables['head_title']        = implode(' | ', $head_title);
-  $variables['base_path']         = base_path();
-  $variables['front_page']        = url();
-  $variables['breadcrumb']        = '';
-  $variables['feed_icons']        = '';
-  $variables['help']              = '';
-  $variables['language']          = $language;
-  $variables['language']->dir     = $language->direction ? 'rtl' : 'ltr';
-  $variables['logo']              = theme_get_setting('logo');
-  $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
-  $variables['main_menu']         = array();
-  $variables['secondary_menu']    = array();
-  $variables['site_name']         = (theme_get_setting('toggle_name') ? variable_get('site_name', 'Drupal') : '');
-  $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
-  $variables['tabs']              = '';
-  $variables['title']             = drupal_get_title();
-
-  // Compile a list of classes that are going to be applied to the body element.
-  $variables['classes_array'][] = 'in-maintenance';
-  if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
-    $variables['classes_array'][] = 'db-offline';
-  }
-  if ($variables['layout'] == 'both') {
-    $variables['classes_array'][] = 'two-sidebars';
-  }
-  elseif ($variables['layout'] == 'none') {
-    $variables['classes_array'][] = 'no-sidebars';
-  }
-  else {
-    $variables['classes_array'][] = 'one-sidebar sidebar-' . $variables['layout'];
-  }
-
-  // Dead databases will show error messages so supplying this template will
-  // allow themers to override the page and the content completely.
+  // Add template suggestions for the maintenance mode (e.g., 'install',
+  // 'update', 'site_offline', etc.) and for when the database is offline.
+  $variables['theme_hook_suggestions'][] = 'maintenance_page__' . $variables['page']['#maintenance_mode'];
   if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
-    $variables['theme_hook_suggestion'] = 'maintenance_page__offline';
+    $variables['theme_hook_suggestions'][] = 'maintenance_page__db_offline';
   }
 }
 
 /**
- * The variables array generated here is a mirror of template_process_html().
- * This processor will run its course when theme_maintenance_page() is invoked.
+ * Process variables for maintenance-page.tpl.php
  *
  * @see maintenance-page.tpl.php
+ * @todo Move this to theme.maintenance.inc once theme() allows include files
+ *   for variable processors to reside in a different directory from the default
+ *   template.
  */
 function template_process_maintenance_page(&$variables) {
-  $variables['head']    = drupal_get_html_head();
-  $variables['css']     = drupal_add_css();
-  $variables['styles']  = drupal_get_css();
-  $variables['scripts'] = drupal_get_js();
+  template_process_page($variables);
 }
 
 /**
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc
index 3fd60c9..a7817f2 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc
@@ -134,36 +134,6 @@ function theme_task_list($variables) {
 }
 
 /**
- * Returns HTML for the installation page.
- *
- * Note: this function is not themeable.
- *
- * @param $variables
- *   An associative array containing:
- *   - content: The page content to show.
- */
-function theme_install_page($variables) {
-  drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  return theme('maintenance_page', $variables);
-}
-
-/**
- * Returns HTML for the update page.
- *
- * Note: this function is not themeable.
- *
- * @param $variables
- *   An associative array containing:
- *   - content: The page content to show.
- *   - show_messages: Whether to output status and error messages.
- *     FALSE can be useful to postpone the messages to a subsequent page.
- */
-function theme_update_page($variables) {
-  drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  return theme('maintenance_page', $variables);
-}
-
-/**
  * Returns HTML for a report of the results from an operation run via authorize.php.
  *
  * @param $variables
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index a9813af..66c4680 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -458,18 +458,6 @@ function overlay_preprocess_html(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_maintenance_page().
- *
- * If the current page request is inside the overlay, add appropriate classes
- * to the <body> element, and simplify the page title.
- *
- * @see overlay_preprocess_maintenance_page()
- */
-function overlay_preprocess_maintenance_page(&$variables) {
-  overlay_preprocess_html($variables);
-}
-
-/**
  * Preprocesses template variables for overlay.tpl.php
  *
  * @see overlay.tpl.php
diff --git a/core/modules/system/maintenance-page.tpl.php b/core/modules/system/maintenance-page.tpl.php
index 5cde0ff..35c0faa 100644
--- a/core/modules/system/maintenance-page.tpl.php
+++ b/core/modules/system/maintenance-page.tpl.php
@@ -4,24 +4,13 @@
  * @file
  * Default theme implementation to display a single Drupal page while offline.
  *
- * All the available variables are mirrored in html.tpl.php and page.tpl.php.
+ * All the available variables are mirrored in page.tpl.php.
  * Some may be blank but they are provided for consistency.
  *
  * @see template_preprocess()
  * @see template_preprocess_maintenance_page()
  */
 ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode ?>" lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>">
-
-<head>
-  <title><?php print $head_title; ?></title>
-  <?php print $head; ?>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-</head>
-<body class="<?php print $classes; ?>">
   <div id="page">
     <div id="header">
       <div id="logo-title">
@@ -45,9 +34,9 @@
         </div> <!-- /name-and-slogan -->
       </div> <!-- /logo-title -->
 
-      <?php if (!empty($header)): ?>
+      <?php if (!empty($page['header'])): ?>
         <div id="header-region">
-          <?php print $header; ?>
+          <?php print render($page['header']); ?>
         </div>
       <?php endif; ?>
 
@@ -55,9 +44,9 @@
 
     <div id="container" class="clearfix">
 
-      <?php if (!empty($sidebar_first)): ?>
+      <?php if (!empty($page['sidebar_first'])): ?>
         <div id="sidebar-first" class="column sidebar">
-          <?php print $sidebar_first; ?>
+          <?php print render($page['sidebar_first']); ?>
         </div> <!-- /sidebar-first -->
       <?php endif; ?>
 
@@ -67,15 +56,15 @@
           <?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
           <?php if (!empty($messages)): print $messages; endif; ?>
           <div id="content-content" class="clearfix">
-            <?php print $content; ?>
+            <?php print render($page['content']); ?>
           </div> <!-- /content-content -->
         </div> <!-- /content -->
 
       </div></div> <!-- /main-squeeze /main -->
 
-      <?php if (!empty($sidebar_second)): ?>
+      <?php if (!empty($page['sidebar_second'])): ?>
         <div id="sidebar-second" class="column sidebar">
-          <?php print $sidebar_second; ?>
+          <?php print render($page['sidebar_second']); ?>
         </div> <!-- /sidebar-second -->
       <?php endif; ?>
 
@@ -83,11 +72,8 @@
 
     <div id="footer-wrapper">
       <div id="footer">
-        <?php if (!empty($footer)): print $footer; endif; ?>
+        <?php if (!empty($page['footer'])): print render($page['footer']); endif; ?>
       </div> <!-- /footer -->
     </div> <!-- /footer-wrapper -->
 
   </div> <!-- /page -->
-
-</body>
-</html>
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 86a5f7b..e7a9c9b 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -298,6 +298,15 @@ function system_element_info() {
     '#theme' => 'page',
     '#theme_wrappers' => array('html'),
   );
+  $types['maintenance_page'] = array(
+    '#show_messages' => TRUE,
+    '#theme' => 'maintenance_page',
+    '#theme_wrappers' => array('html'),
+    // Most callers of drupal_render_maintenance_page() set this to an
+    // appropriate value (e.g., 'install', 'update', 'site_offline', etc.).
+    // This default is for when the caller doesn't specify.
+    '#maintenance_mode' => 'other',
+  );
   // By default, we don't want Ajax commands being rendered in the context of an
   // HTML page, so we don't provide defaults for #theme or #theme_wrappers.
   // However, modules can set these properties (for example, to provide an HTML
diff --git a/core/themes/bartik/css/maintenance-page.css b/core/themes/bartik/css/maintenance-page.css
index c13c77b..6002fb4 100644
--- a/core/themes/bartik/css/maintenance-page.css
+++ b/core/themes/bartik/css/maintenance-page.css
@@ -1,9 +1,9 @@
 
-body.maintenance-page {
+body.maintenance-mode {
   background-color: #fff;
   color: #000;
 }
-.maintenance-page #page-wrapper {
+.maintenance-mode #page-wrapper {
   background: #fff;
   margin-left: auto;
   margin-right: auto;
@@ -13,55 +13,55 @@ body.maintenance-page {
   border: 1px solid #ddd;
   margin-top: 40px;
 }
-.maintenance-page #page {
+.maintenance-mode #page {
   margin: 20px 40px 40px;
 }
-.maintenance-page #main-wrapper {
+.maintenance-mode #main-wrapper {
   min-height: inherit;
 }
-.maintenance-page #header,
-.maintenance-page #messages,
-.maintenance-page #main {
+.maintenance-mode #header,
+.maintenance-mode #messages,
+.maintenance-mode #main {
   width: auto;
 }
-.maintenance-page #header div.section,
-.maintenance-page #main {
+.maintenance-mode #header div.section,
+.maintenance-mode #main {
   width: 700px;
 }
-.maintenance-page #main {
+.maintenance-mode #main {
   margin: 0;
 }
-.maintenance-page #content .section {
+.maintenance-mode #content .section {
   padding: 0 0 0 10px;
 }
-.maintenance-page #header {
+.maintenance-mode #header {
   background-color: #fff;
   background-image: none;
 }
-.maintenance-page #name-and-slogan {
+.maintenance-mode #name-and-slogan {
   margin-bottom: 50px;
   margin-left: 0;
   padding-top: 20px;
   font-size: 90%;
 }
-.maintenance-page #name-and-slogan,
-.maintenance-page #name-and-slogan a,
-.maintenance-page #name-and-slogan a:hover,
-.maintenance-page #name-and-slogan a:hover {
+.maintenance-mode #name-and-slogan,
+.maintenance-mode #name-and-slogan a,
+.maintenance-mode #name-and-slogan a:hover,
+.maintenance-mode #name-and-slogan a:hover {
   color: #777;
 }
-.maintenance-page  h1#page-title {
+.maintenance-mode  h1#page-title {
   line-height: 1em;
   margin-top: 0;
 }
-.maintenance-page #messages {
+.maintenance-mode #messages {
   padding: 0;
   margin-top: 30px;
 }
-.maintenance-page #messages div.messages {
+.maintenance-mode #messages div.messages {
   margin: 0;
 }
-.maintenance-page #messages div.section {
+.maintenance-mode #messages div.section {
   padding: 0;
   width: auto;
 }
diff --git a/core/themes/bartik/templates/maintenance-page.tpl.php b/core/themes/bartik/templates/maintenance-page.tpl.php
index f2b998e..f93c761 100644
--- a/core/themes/bartik/templates/maintenance-page.tpl.php
+++ b/core/themes/bartik/templates/maintenance-page.tpl.php
@@ -11,20 +11,6 @@
  * @see bartik_process_maintenance_page()
  */
 ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode; ?>" lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
-<head>
-  <?php print $head; ?>
-  <title><?php print $head_title; ?></title>
-  <?php print $styles; ?>
-  <?php print $scripts; ?>
-</head>
-<body class="<?php print $classes; ?>" <?php print $attributes;?>>
-
-  <div id="skip-link">
-    <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
-  </div>
 
   <div id="page-wrapper"><div id="page">
 
@@ -51,7 +37,7 @@
       <div id="content" class="column"><div class="section">
         <a id="main-content"></a>
         <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
-        <?php print $content; ?>
+        <?php print render($page['content']); ?>
         <?php if ($messages): ?>
           <div id="messages"><div class="section clearfix">
             <?php print $messages; ?>
@@ -61,6 +47,3 @@
     </div></div> <!-- /#main, /#main-wrapper -->
 
   </div></div> <!-- /#page, /#page-wrapper -->
-
-</body>
-</html>
diff --git a/core/themes/seven/maintenance-page.tpl.php b/core/themes/seven/maintenance-page.tpl.php
index 85c9f08..6f1478f 100644
--- a/core/themes/seven/maintenance-page.tpl.php
+++ b/core/themes/seven/maintenance-page.tpl.php
@@ -1,15 +1,3 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode ?>" lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>">
-  <head>
-    <title><?php print $head_title; ?></title>
-    <?php print $head; ?>
-    <?php print $styles; ?>
-    <?php print $scripts; ?>
-  </head>
-  <body class="<?php print $classes; ?>">
-
-  <?php print $page_top; ?>
 
   <div id="branding">
     <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?>
@@ -17,12 +5,12 @@
 
   <div id="page">
 
-    <?php if ($sidebar_first): ?>
+    <?php if ($page['sidebar_first']): ?>
       <div id="sidebar-first" class="sidebar">
         <?php if ($logo): ?>
           <img id="logo" src="<?php print $logo ?>" alt="<?php print $site_name ?>" />
         <?php endif; ?>
-        <?php print $sidebar_first ?>
+        <?php print render($page['sidebar_first'])?>
       </div>
     <?php endif; ?>
 
@@ -30,17 +18,12 @@
       <?php if ($messages): ?>
         <div id="console"><?php print $messages; ?></div>
       <?php endif; ?>
-      <?php if ($help): ?>
+      <?php if ($page['help']): ?>
         <div id="help">
-          <?php print $help; ?>
+          <?php print render($page['help']); ?>
         </div>
       <?php endif; ?>
-      <?php print $content; ?>
+      <?php print render($page['content']); ?>
     </div>
 
   </div>
-
-  <?php print $page_bottom; ?>
-
-  </body>
-</html>
diff --git a/core/themes/seven/style-rtl.css b/core/themes/seven/style-rtl.css
index a41d325..f6e6703 100644
--- a/core/themes/seven/style-rtl.css
+++ b/core/themes/seven/style-rtl.css
@@ -185,10 +185,10 @@ div.admin-options div.form-item {
 }
 
 /* Maintenance theming */
-body.in-maintenance #sidebar-first {
+body.maintenance-mode #sidebar-first {
   float: right;
 }
-body.in-maintenance #content {
+body.maintenance-mode #content {
   float: left;
   padding-left: 20px;
   padding-right: 0;
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index 4214453..d51ff43 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -814,39 +814,39 @@ div.admin-options div.form-item {
 }
 
 /* Maintenance theming */
-body.in-maintenance #sidebar-first {
+body.maintenance-mode #sidebar-first {
   float: left; /* LTR */
   width: 200px;
 }
-body.in-maintenance #content {
+body.maintenance-mode #content {
   float: right; /* LTR */
   width: 550px;
   padding-right: 20px; /* LTR */
   clear: none;
 }
-body.in-maintenance #page {
+body.maintenance-mode #page {
   overflow: auto;
   width: 770px;
   margin: 0 auto;
   padding-top: 2em;
 }
-body.in-maintenance #branding h1 {
+body.maintenance-mode #branding h1 {
   width: 770px;
   margin: 0 auto;
   float: none;
 }
-body.in-maintenance .form-radios .form-type-radio {
+body.maintenance-mode .form-radios .form-type-radio {
   padding: 2px 0;
 }
-body.in-maintenance div.form-item:after {
+body.maintenance-mode div.form-item:after {
   content: "";
   display: none;
   clear: none;
 }
-body.in-maintenance .form-submit {
+body.maintenance-mode .form-submit {
   display: block;
 }
-body.in-maintenance #logo {
+body.maintenance-mode #logo {
   margin-bottom: 1.5em;
   max-width: 180px;
 }
diff --git a/core/themes/seven/template.php b/core/themes/seven/template.php
index 145ad22..020774b 100644
--- a/core/themes/seven/template.php
+++ b/core/themes/seven/template.php
@@ -1,18 +1,6 @@
 <?php
 
 /**
- * Override or insert variables into the maintenance page template.
- */
-function seven_preprocess_maintenance_page(&$vars) {
-  // While markup for normal pages is split into page.tpl.php and html.tpl.php,
-  // the markup for the maintenance page is all in the single
-  // maintenance-page.tpl.php template. So, to have what's done in
-  // seven_preprocess_html() also happen on the maintenance page, it has to be
-  // called here.
-  seven_preprocess_html($vars);
-}
-
-/**
  * Override or insert variables into the html template.
  */
 function seven_preprocess_html(&$vars) {
diff --git a/core/update.php b/core/update.php
index 4ddab83..5720b93 100644
--- a/core/update.php
+++ b/core/update.php
@@ -358,7 +358,7 @@ function update_check_requirements($skip_warnings = FALSE) {
     drupal_set_title('Requirements problem');
     $status_report = theme('status_report', array('requirements' => $requirements));
     $status_report .= 'Check the messages and <a href="' . check_url(drupal_requirements_url($severity)) . '">try again</a>.';
-    print theme('update_page', array('content' => $status_report));
+    drupal_deliver_html_page($status_report);
     exit();
   }
 }
@@ -492,5 +492,5 @@ if (isset($output) && $output) {
   drupal_session_start();
   // We defer the display of messages until all updates are done.
   $progress_page = ($batch = batch_get()) && isset($batch['running']);
-  print theme('update_page', array('content' => $output, 'show_messages' => !$progress_page));
+  drupal_deliver_html_page(array('#markup' => $output, '#show_messages' => !$progress_page));
 }
