diff --git a/flag.services.yml b/flag.services.yml
index 34a910d..74f09cc 100644
--- a/flag.services.yml
+++ b/flag.services.yml
@@ -8,6 +8,8 @@ services:
   flag:
     class: Drupal\flag\FlagService
     arguments: ['@plugin.manager.flag.flagtype', '@event_dispatcher', '@entity.query', '@current_user', '@entity.manager']
+    tags:
+      - { name: event_subscriber }
   flag.count:
     class: Drupal\flag\FlagCountManager
     arguments: ['@database']
diff --git a/src/FlagService.php b/src/FlagService.php
index a2bd9c8..5b888e7 100644
--- a/src/FlagService.php
+++ b/src/FlagService.php
@@ -14,15 +14,20 @@ use Drupal\Core\Session\AccountInterface;
 use Drupal\flag\Event\FlagEvents;
 use Drupal\flag\Event\FlagResetEvent;
 use Drupal\flag\Event\FlaggingEvent;
+use Drupal\flag\Event\FlagDeleteEvent;
 use Drupal\flag\FlagInterface;
 use Drupal\flag\FlagServiceInterface;
 use Drupal\flag\FlagTypePluginManager;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
 /**
  * Flag service.
+ *  - Handles search requests for flags and flaggings.
+ *  - Performs flagging and unflaging operations.
+ *  - Resets a flag on request and automatically when a flag is deleted.
  */
-class FlagService implements FlagServiceInterface {
+class FlagService implements FlagServiceInterface, EventSubscriberInterface{
 
   /**
    * The flag type plugin manager injected into the service.
@@ -314,4 +319,23 @@ class FlagService implements FlagServiceInterface {
     return $this->entityManager->getStorage('flagging')->loadMultiple($ids);
   }
 
+  /**
+   * Responds to Flag delete events and removes all the assocated flaggings.
+   *
+   * @param FlagDeleteEvent $event
+   *   The Flag Event.
+   */
+  public function deleteHandler(FlagDeleteEvent $event){
+    $this->reset($event->getFlag());
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getSubscribedEvents() {
+    $events = array();
+    $events[FlagEvents::FLAG_DELETED][] = array('deleteHandler', -100);
+    return $events;
+  }
+
 }
diff --git a/src/Tests/FlagCountsTest.php b/src/Tests/FlagCountsTest.php
index 5bcedaa..d66cc46 100644
--- a/src/Tests/FlagCountsTest.php
+++ b/src/Tests/FlagCountsTest.php
@@ -23,7 +23,6 @@ class FlagCountsTest extends FlagTestBase {
    * The flag.
    *
    * @var \Drupal\flag\FlagInterface
-   *
    */
   protected $flag;
 
@@ -42,6 +41,13 @@ class FlagCountsTest extends FlagTestBase {
   protected $flagService;
 
   /**
+   * The flag count service.
+   *
+   * @var \Drupal\flag\FlagCountManagerInterface
+   */
+  protected $flagCountService;
+
+  /**
    * User object.
    *
    * @var \Drupal\user\Entity\User|false
@@ -55,6 +61,7 @@ class FlagCountsTest extends FlagTestBase {
     parent::setUp();
 
     $this->flagService = \Drupal::service('flag');
+    $this->flagCountService = \Drupal::service('flag.count');
 
     // Create a flag.
     $this->flag = $this->createFlag('node', ['article'], 'reload');
@@ -85,25 +92,94 @@ class FlagCountsTest extends FlagTestBase {
     // Flag the node.
     $this->flagService->flag($this->flag, $this->node, $this->adminUser);
 
-    $flagCountService = \Drupal::service('flag.count');
-
     // Check each of the count API functions.
-    $flag_get_entity_flag_counts = $flagCountService->getEntityCounts($this->flag, 'node');
+    $flag_get_entity_flag_counts = $this->flagCountService->getEntityCounts($this->flag, 'node');
     $this->assertEqual($flag_get_entity_flag_counts, 1, "getEntityFlagCounts() returns the expected count.");
 
-    $flag_get_user_flag_counts = $flagCountService->getUserCounts($this->flag, $this->adminUser);
+    $flag_get_user_flag_counts = $this->flagCountService->getUserCounts($this->flag, $this->adminUser);
     $this->assertEqual($flag_get_user_flag_counts, 1, "getUserFlagCounts() returns the expected count.");
 
-    $flag_get_counts = $flagCountService->getCounts($this->node);
+    $flag_get_counts = $this->flagCountService->getCounts($this->node);
     $this->assertEqual($flag_get_counts[$this->flag->id()], 1, "getCounts() returns the expected count.");
 
-    $flag_get_flag_counts = $flagCountService->getTotals($this->flag);
+    $flag_get_flag_counts = $this->flagCountService->getTotals($this->flag);
     $this->assertEqual($flag_get_flag_counts, 1, "getFlagTotalCounts() returns the expected count.");
 
     $this->flagService->reset($this->flag);
     drupal_static_reset();
-    $flag_get_flag_counts = $flagCountService->getTotals($this->flag);
+    $flag_get_flag_counts = $this->flagCountService->getTotals($this->flag);
     $this->assertEqual($flag_get_flag_counts, 0, "getCounts() on reset flag returns the expected count.");
   }
 
+  /**
+   * Tests flaggings are deleted and counts are removed when a flag is deleted.
+   */
+  public function testFlagDeletion() {
+
+    // Create a flag.
+    $flag = $this->createFlag('node', ['article'], 'reload');
+
+    // Create a user who may flag.
+    $this->adminUser = $this->drupalCreateUser([
+      'administer flags',
+    ]);
+
+    // Create a article to flag.
+    $article1 = Node::create([
+      'body' => [
+        [
+          'value' => $this->randomMachineName(32),
+          'format' => filter_default_format(),
+        ]
+      ],
+      'type' => 'article',
+      'title' => $this->randomMachineName(8),
+    ]);
+    $article1->save();
+
+    // Create a second article.
+    $article2 = Node::create([
+      'body' => [
+        [
+          'value' => $this->randomMachineName(32),
+          'format' => filter_default_format(),
+        ]
+      ],
+      'type' => 'article',
+      'title' => $this->randomMachineName(8),
+    ]);
+    $article2->save();
+
+    // Flag both.
+    $this->flagService->flag($flag, $article1);
+    $this->flagService->flag($flag, $article2);
+
+    // Confirm the counts have been incremented.
+    $article1_count_before = $this->flagCountService->getCounts($article1);
+    $this->assertEqual($article1_count_before[$flag->id()], 1, 'The article1 has been flagged.');
+    $article2_count_before = $this->flagCountService->getCounts($article2);
+    $this->assertEqual(count($article2_count_before[$flag->id()]), 1, 'The article2 has been flagged.');
+
+    // Confirm the flagging have been created.
+    $flaggings_before = $this->flagService->getFlaggings($flag);
+    $this->assertEqual(count($flaggings_before), 2, 'There are two flaggings associated with the flag');
+
+    // Delete the flag.
+    $flag->delete();
+    // Reset counts stored in FlagCountManager and force inspection of the
+    // peristent store.
+    drupal_static_reset();
+
+    // The list of all flaggings MUST now be empty.
+    $flaggings_after = $this->flagService->getFlaggings($flag);
+    $this->assert(empty($flaggings_after), 'The flaggings were removed, when the flag was deleted');
+
+    // The flag id is now stale, so instead of searching for the flag in the
+    // count array as before we require the entire array should be empty.
+    $article1_counts_after = $this->flagCountService->getCounts($article1);
+    $this->assert(empty($article1_counts_after), 'Article1 counts has been removed.');
+    $article2_counts_after = $this->flagCountService->getCounts($article2);
+    $this->assertEqual(empty($article2_counts_after), 'Article2 counts has been removed.');
+  }
+
 }
