diff --git a/includes/flag/flag_flag.inc b/includes/flag/flag_flag.inc
index 071b148..ee1dc8a 100644
--- a/includes/flag/flag_flag.inc
+++ b/includes/flag/flag_flag.inc
@@ -788,6 +788,9 @@ class flag_flag {
       }
     }
     elseif ($action == 'flag') {
+      // Invoke the entity presave hook.
+      module_invoke_all('entity_presave', $flagging, 'flagging');
+
       if ($this->uses_anonymous_cookies()) {
         $this->_flag_anonymous($entity_id);
       }
@@ -850,17 +853,23 @@ class flag_flag {
   private function _insert_flagging($flagging) {
     field_attach_presave('flagging', $flagging);
     field_attach_insert('flagging', $flagging);
+    // Invoke the entity insert hook.
+    module_invoke_all('entity_insert', $flagging, 'flagging');
   }
   private function _update_flagging($flagging) {
     field_attach_presave('flagging', $flagging);
     field_attach_update('flagging', $flagging);
     // Update the cache.
     entity_get_controller('flagging')->resetCache();
+    // Invoke the entity update hook.
+    module_invoke_all('entity_update', $flagging, 'flagging');
   }
   private function _delete_flagging($flagging) {
     field_attach_delete('flagging', $flagging);
     // Remove from the cache.
     entity_get_controller('flagging')->resetCache();
+    // Invoke the entity delete hook.
+    module_invoke_all('entity_delete', $flagging, 'flagging');
   }
 
   /**
