diff --git a/core/lib/Drupal/Core/Update/UpdateKernel.php b/core/lib/Drupal/Core/Update/UpdateKernel.php
index 4608f18ea2..818e031e27 100644
--- a/core/lib/Drupal/Core/Update/UpdateKernel.php
+++ b/core/lib/Drupal/Core/Update/UpdateKernel.php
@@ -3,6 +3,9 @@
 namespace Drupal\Core\Update;
 
 use Drupal\Core\DrupalKernel;
+use Drupal\Core\Extension\InfoParser;
+use Drupal\Core\Extension\InfoParserInterface;
+use Drupal\Core\Extension\ModuleHandler;
 use Drupal\Core\Session\AnonymousUserSession;
 use Drupal\Core\Site\Settings;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
@@ -25,12 +28,47 @@ class UpdateKernel extends DrupalKernel {
    * {@inheritdoc}
    */
   public function discoverServiceProviders() {
+    // Get the installed extensions. The code of the extensions at this point
+    // may already have dependencies on other extensions that are not enabled
+    // yet. Find the new dependencies and add them to the module list so that
+    // their services are discovered and the kernel can be booted.
+    $extensions = $this->getConfigStorage()->read('core.extension');
+    $this->moduleList = isset($extensions['module']) ? $extensions['module'] : [];
+    $parser = new InfoParser();
+    foreach ($this->moduleList as $module => $weight) {
+      $this->addModuleDependencies($module, $parser);
+    }
+
     parent::discoverServiceProviders();
 
     $this->serviceProviderClasses['app']['update_kernel'] = 'Drupal\Core\Update\UpdateServiceProvider';
   }
 
   /**
+   * Add a modules dependencies to the internal module list.
+   *
+   * @param string $module
+   *   The name of the module to check for uninstalled dependencies.
+   * @param \Drupal\Core\Extension\InfoParserInterface $parser
+   *   The info file parser to extract the dependencies from.
+   */
+  protected function addModuleDependencies($module, InfoParserInterface $parser) {
+    $data = $this->moduleData($module);
+    $info = $parser->parse($data->getPathname());
+    if (isset($info['dependencies'])) {
+      foreach ($info['dependencies'] as $dependency) {
+        $name = ModuleHandler::parseDependency($dependency)['name'];
+        if (!array_key_exists($name, $this->moduleList)) {
+          // If the dependency is not in the list, add it and then find the
+          // dependencies of the newly added one and add those too.
+          $this->moduleList[$name] = 0;
+          $this->addModuleDependencies($name, $parser);
+        }
+      }
+    }
+  }
+
+  /**
    * {@inheritdoc}
    */
   protected function initializeContainer() {
diff --git a/core/modules/system/src/Tests/Update/UpdatePathNewDependencyTest.php b/core/modules/system/src/Tests/Update/UpdatePathNewDependencyTest.php
new file mode 100644
index 0000000000..5408141c77
--- /dev/null
+++ b/core/modules/system/src/Tests/Update/UpdatePathNewDependencyTest.php
@@ -0,0 +1,48 @@
+<?php
+
+namespace Drupal\system\Tests\Update;
+
+/**
+ * Modules can introduce new dependencies and enable them in update hooks.
+ *
+ * @group system
+ */
+class UpdatePathNewDependencyTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
+    ];
+  }
+
+  /**
+   * Test that a module can add services that depend on new modules.
+   */
+  public function testUpdateNewDependency() {
+    // The new_dependency_test before the update is just an empty info.yml file.
+    // The code of the new_dependency_test module is after the update and
+    // contains the dependency on the new_dependency_test_with_service module.
+    $extension_config = \Drupal::configFactory()->getEditable('core.extension');
+    $extension_config
+      ->set('module.new_dependency_test', 0)
+      ->set('module', module_config_sort($extension_config->get('module')))
+      ->save(TRUE);
+    drupal_set_installed_schema_version('new_dependency_test', \Drupal::CORE_MINIMUM_SCHEMA_VERSION);
+
+    // Running the updates enables the dependency.
+    $this->runUpdates();
+
+    $this->assertTrue(array_key_exists('new_dependency_test', \Drupal::config('core.extension')->get('module')));
+    $this->assertTrue(array_key_exists('new_dependency_test_with_service', \Drupal::config('core.extension')->get('module')));
+
+    // Rebuild the container and test that the new service works.
+    $this->rebuildContainer();
+    $this->assertEqual('Hello', \Drupal::service('new_dependency_test.dependent')->greet());
+    $this->assertEqual('Hello World', \Drupal::service('new_dependency_test.decorated')->greet());
+
+  }
+
+}
diff --git a/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.info.yml b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.info.yml
new file mode 100644
index 0000000000..eab08261b5
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.info.yml
@@ -0,0 +1,8 @@
+name: 'New Dependency test'
+type: module
+description: 'Support module for update testing.'
+package: Testing
+version: VERSION
+core: 8.x
+dependencies:
+  - new_dependency_test_with_service
diff --git a/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.install b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.install
new file mode 100644
index 0000000000..c099059fd4
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.install
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the new_dependency_test module.
+ */
+
+/**
+ * Enable the new_dependency_test_with_service module.
+ */
+function new_dependency_test_update_8001() {
+  debug('Running the new_dependency_test_update_8001.');
+  \Drupal::getContainer()->get('module_installer')->install(['new_dependency_test_with_service']);
+}
diff --git a/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.services.yml b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.services.yml
new file mode 100644
index 0000000000..56d2dfef9c
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test/new_dependency_test.services.yml
@@ -0,0 +1,9 @@
+services:
+  new_dependency_test.dependent:
+    class: Drupal\new_dependency_test\DependentService
+    arguments: ['@new_dependency_test_with_service.service']
+  new_dependency_test.decorated:
+    class: Drupal\new_dependency_test\DecoratedDependentService
+    arguments: ['@new_dependency_test.dependent']
+  new_dependency_test.alias:
+    alias: new_dependency_test.dependent
diff --git a/core/modules/system/tests/modules/new_dependency_test/src/DecoratedDependentService.php b/core/modules/system/tests/modules/new_dependency_test/src/DecoratedDependentService.php
new file mode 100644
index 0000000000..6a2aa93def
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test/src/DecoratedDependentService.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\new_dependency_test;
+
+/**
+ * Service that gets the other service of the same module injected.
+ *
+ * This service indirectly depends on a not-yet-defined service.
+ */
+class DecoratedDependentService {
+
+  /**
+   * The injected service.
+   *
+   * @var \Drupal\new_dependency_test\DependentService
+   */
+  protected $service;
+
+  /**
+   * DecoratedDependentService constructor.
+   *
+   * @param \Drupal\new_dependency_test\DependentService $service
+   *   The service of the same module which has the new dependency.
+   */
+  public function __construct(DependentService $service) {
+    $this->service = $service;
+  }
+
+  /**
+   * Get the simple greeting from the service and decorate it.
+   *
+   * @return string
+   *   The enhanced greeting.
+   */
+  public function greet() {
+    return $this->service->greet() . ' World';
+  }
+
+}
diff --git a/core/modules/system/tests/modules/new_dependency_test/src/DependentService.php b/core/modules/system/tests/modules/new_dependency_test/src/DependentService.php
new file mode 100644
index 0000000000..22e1631a09
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test/src/DependentService.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\new_dependency_test;
+
+use Drupal\new_dependency_test_with_service\NewService;
+
+/**
+ * Generic service with a dependency on a service defined in a new module.
+ */
+class DependentService {
+
+  /**
+   * The injected service.
+   *
+   * @var \Drupal\new_dependency_test_with_service\NewService
+   */
+  protected $service;
+
+  /**
+   * DependentService constructor.
+   *
+   * @param \Drupal\new_dependency_test_with_service\NewService $service
+   *   The service of the new module.
+   */
+  public function __construct(NewService $service) {
+    $this->service = $service;
+  }
+
+  /**
+   * Get the simple greeting from the service.
+   *
+   * @return string
+   *   The greeting.
+   */
+  public function greet() {
+    return $this->service->greet();
+  }
+
+}
diff --git a/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.info.yml b/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.info.yml
new file mode 100644
index 0000000000..5091a7f79d
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.info.yml
@@ -0,0 +1,6 @@
+name: 'New Dependency test with service'
+type: module
+description: 'Support module for update testing.'
+package: Testing
+version: VERSION
+core: 8.x
diff --git a/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml b/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml
new file mode 100644
index 0000000000..26ba284e29
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml
@@ -0,0 +1,3 @@
+services:
+  new_dependency_test_with_service.service:
+    class: Drupal\new_dependency_test_with_service\NewService
diff --git a/core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php b/core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php
new file mode 100644
index 0000000000..6137fc2ecf
--- /dev/null
+++ b/core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace Drupal\new_dependency_test_with_service;
+
+/**
+ * Generic service returning a greeting.
+ */
+class NewService {
+
+  /**
+   * Get a simple greeting.
+   *
+   * @return string
+   *   The greeting provided by the new service.
+   */
+  public function greet() {
+    return 'Hello';
+  }
+
+}
