diff --git a/core/modules/user/lib/Drupal/user/Controller/UserController.php b/core/modules/user/lib/Drupal/user/Controller/UserController.php
index e3d7431..a3a80e7 100644
--- a/core/modules/user/lib/Drupal/user/Controller/UserController.php
+++ b/core/modules/user/lib/Drupal/user/Controller/UserController.php
@@ -9,12 +9,41 @@
 
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Controller\ControllerBase;
+use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\user\UserInterface;
+use Drupal\user\UserLogout;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Controller routines for user routes.
  */
-class UserController extends ControllerBase {
+class UserController extends ControllerBase implements ContainerInjectionInterface{
+
+  /**
+   * The user logout service.
+   *
+   * @var \Drupal\user\UserLogout
+   */
+  protected $userLogout;
+
+  /**
+   * Constructs a UserController instance.
+   *
+   * @param \Drupal\user\UserLogout $user_logout
+   *   The user logout service.
+   */
+  public function __construct(UserLogout $user_logout) {
+    $this->userLogout = $user_logout;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('user.logout')
+    );
+  }
 
   /**
    * Returns the user page.
@@ -57,7 +86,7 @@ public function userTitle(UserInterface $user = NULL) {
    *   A redirection to home page.
    */
   public function logout() {
-    user_logout();
+    $this->userLogout->logout();
     return $this->redirect('<front>');
   }
 
diff --git a/core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php b/core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php
index 3c23086..417ff6e 100644
--- a/core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php
+++ b/core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\user\EventSubscriber;
 
+use Drupal\user\UserLogout;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
@@ -18,6 +19,23 @@
 class MaintenanceModeSubscriber implements EventSubscriberInterface {
 
   /**
+   * The user logout service.
+   *
+   * @var \Drupal\user\UserLogout
+   */
+  protected $userLogout;
+
+  /**
+   * Constructs a MaintenanceModeSubscriber instance.
+   *
+   * @param \Drupal\user\UserLogout $user_logout
+   *   The user logout service.
+   */
+  public function __construct(UserLogout $user_logout) {
+    $this->userLogout = $user_logout;
+  }
+
+  /**
    * Determine whether the page is configured to be offline.
    *
    * @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
diff --git a/core/modules/user/lib/Drupal/user/UserLogout.php b/core/modules/user/lib/Drupal/user/UserLogout.php
new file mode 100644
index 0000000..14b76cf
--- /dev/null
+++ b/core/modules/user/lib/Drupal/user/UserLogout.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\user\UserLogout.
+ */
+
+namespace Drupal\user;
+
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\Session\AccountInterface;
+
+/**
+ * Defines a service to logout the current account.
+ */
+class UserLogout {
+
+  /**
+   * The current active account.
+   *
+   * @var \Drupal\Core\Session\AccountInterface
+   */
+  protected $account;
+
+  /**
+   * The module handler for invoking the user_logout hook.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected $moduleHandler;
+
+  /**
+   * Constructs a new UserLogout instance.
+   *
+   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
+   *   The module handler for invoking the user_logout hook.
+   * @param \Drupal\Core\Session\AccountInterface $account
+   *   The current active account.
+   */
+  public function __construct(ModuleHandlerInterface $module_handler, AccountInterface $account) {
+    $this->moduleHandler = $module_handler;
+    $this->account = $account;
+  }
+
+  /**
+   * Logouts the current user.
+   */
+  public function logout() {
+    if ($this->account->isAuthenticated()) {
+      watchdog('user', 'Session closed for %name.', array('%name' => $this->account->getUsername()));
+
+      $this->moduleHandler->invokeAll('user_logout', array($this->account));
+
+      // Destroy the current session, and reset $user to the anonymous user.
+      session_destroy();
+    }
+    // @todo Figure out what to do when this called on non-active accounts.
+  }
+
+} 
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index e25a4ac..da1e123 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -1985,14 +1985,9 @@ function user_library_info() {
 
 /**
  * Logs the current user out.
+ *
+ * @deprecated as of Drupal 8.0. Use \Drupal::service('user.logout')->logout().
  */
 function user_logout() {
-  global $user;
-
-  watchdog('user', 'Session closed for %name.', array('%name' => $user->getUsername()));
-
-  \Drupal::moduleHandler()->invokeAll('user_logout', array($user));
-
-  // Destroy the current session, and reset $user to the anonymous user.
-  session_destroy();
+  \Drupal::service('user.logout')->logout();
 }
diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml
index 6fb7d47..3e637b5 100644
--- a/core/modules/user/user.services.yml
+++ b/core/modules/user/user.services.yml
@@ -23,5 +23,9 @@ services:
     arguments: ['@database', '@config.factory']
   user_maintenance_mode_subscriber:
     class: Drupal\user\EventSubscriber\MaintenanceModeSubscriber
+    arguments: ['@current_user']
     tags:
       - { name: event_subscriber }
+  user.logout:
+    class: Drupal\user\UserLogout
+    arguments: ['@module_handler', '@current_user']
