diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 24309b7..b15ff37 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -89,3 +89,14 @@ function path_entity_translation_delete(EntityInterface $translation) {
     \Drupal::service('path.alias_storage')->delete($conditions);
   }
 }
+
+/**
+ * Implements hook_entity_delete().
+ */
+function path_entity_delete(Drupal\Core\Entity\EntityInterface $entity) {
+  if ($entity->hasLinkTemplate('canonical')) {
+    $path = $entity->toUrl()->getInternalPath();
+    $conditions = ['source' => '/' . $path];
+    \Drupal::service('path.alias_storage')->delete($conditions);
+  }
+}
diff --git a/core/modules/path/tests/src/Kernel/EntityDeleteTest.php b/core/modules/path/tests/src/Kernel/EntityDeleteTest.php
new file mode 100644
index 0000000..c6ca323
--- /dev/null
+++ b/core/modules/path/tests/src/Kernel/EntityDeleteTest.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\path\tests\Kernel\EntityDeleteTest.
+ */
+
+namespace Drupal\Tests\path\Kernel;
+
+use Drupal\entity_test\Entity\EntityTest;
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests path alias deletion when a node is deleted.
+ *
+ * @group path
+ */
+class EntityDeleteTest extends KernelTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('path', 'entity_test', 'language', 'user', 'system');
+
+  protected function setUp() {
+    parent::setUp();
+
+    $this->installEntitySchema('entity_test');
+    $this->installSchema('system', 'url_alias');
+    $this->installSchema('system', 'router');
+    \Drupal::service('router.builder')->rebuild();
+  }
+
+  /**
+   * Tests that the path alias is deleted when the entity is deleted.
+   */
+  public function testDeleteEntity() {
+    $entity = EntityTest::create();
+    $entity->save();
+    $path = $entity->toUrl()->getInternalPath();
+    \Drupal::service('path.alias_storage')->save('/' . $path, '/foobar');
+    $exists = \Drupal::service('path.alias_storage')->lookupPathAlias('/' . $path, 'en');
+    self::assertTrue($exists);
+    $entity->delete();
+    $exists = \Drupal::service('path.alias_storage')->lookupPathAlias('/' . $path, 'en');
+    self::assertFalse($exists);
+  }
+
+}
