diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 011db8d..b022502 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -3031,6 +3031,25 @@ function template_preprocess_maintenance_page(&$variables) {
     isset($variables[$region]) ? $variables[$region] .= $region_content : $variables[$region] = $region_content;
   }
 
+  // Make sure content is a render array and attach CSS.
+  if (is_string($variables['content'])) {
+    $variables['content'] = array(
+      '#markup' => $variables['content'],
+    );
+  }
+  $path = drupal_get_path('module', 'system');
+  $variables['content']['#attached'] = array(
+    'css' => array(
+      // These are usually added from system_init() -except maintenance.css.
+      // When the database is inactive it's not called so we add it here.
+      $path . '/system.base.css',
+      $path . '/system.admin.css',
+      $path . '/system.theme.css',
+      $path . '/system.maintenance.css',
+    ),
+  );
+  $variables['content'] = drupal_render($variables['content']);
+
   // Setup layout variable.
   $variables['layout'] = 'none';
   if (!empty($variables['sidebar_first'])) {
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc
index 9215957..58faf74 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc
@@ -91,14 +91,6 @@ function _drupal_maintenance_theme() {
     $ancestor = $themes[$ancestor]->base_theme;
   }
   _drupal_theme_initialize($themes[$theme], array_reverse($base_theme), '_theme_load_offline_registry');
-
-  // These are usually added from system_init() -except maintenance.css.
-  // When the database is inactive it's not called so we add it here.
-  $path = drupal_get_path('module', 'system');
-  drupal_add_css($path . '/system.base.css');
-  drupal_add_css($path . '/system.admin.css');
-  drupal_add_css($path . '/system.theme.css');
-  drupal_add_css($path . '/system.maintenance.css');
 }
 
 /**
