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/src/Tests/PathAliasTest.php b/core/modules/path/src/Tests/PathAliasTest.php
index 7e85cda..15f3bfc 100644
--- a/core/modules/path/src/Tests/PathAliasTest.php
+++ b/core/modules/path/src/Tests/PathAliasTest.php
@@ -317,6 +317,18 @@ function testNodeAlias() {
     $this->drupalGet(trim($edit['path[0][alias]'], '/'));
     $this->assertText($node4->label(), 'Alias trimmed trailing slash.');
     $this->assertResponse(200);
+
+    // Create fifth test node.
+    $node5 = $this->drupalCreateNode();
+
+    // Set a path alias.
+    $edit = array('path[0][alias]' => '/' . $this->randomMachineName(8));
+    $this->drupalPostForm('node/' . $node5->id() . '/edit', $edit, t('Save'));
+
+    // Delete the node and check that the path alias is also deleted.
+    $node5->delete();
+    $path_alias = \Drupal::service('path.alias_storage')->lookupPathAlias('/node/' . $node5->id(), $node5->language()->getId());
+    $this->assertFalse($path_alias, 'Alias was successfully deleted when the referenced node was deleted.');
   }
 
   /**
