diff --git a/masquerade.api.php b/masquerade.api.php
new file mode 100644
index 0000000..9619e55
--- /dev/null
+++ b/masquerade.api.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * @file
+ *  Documents hooks provided by Masquerade.
+ */
+
+/**
+ * Implements hook_masquerade_to_begin().
+ *
+ * Identifies when a user is about to start masquerading as someone else.
+ *
+ * @param $current_user
+ *  A fully loaded user account of the person who initiated the masquerade.
+ * @param $new_user
+ *  A fully loaded user account of the person who will be masqueraded as.
+ *
+ * @see hook_masquerade_to_begin()
+ */
+function hook_masquerade_to_begin($current_user, $new_user) {
+}
+
+/**
+ * Implements hook_masquerade_began().
+ *
+ * Identifies when a user has started masquerading as someone else.
+ *
+ * @param $current_user
+ *  A fully loaded user account of the person who initiated the masquerade.
+ * @param $new_user
+ *  A fully loaded user account of the person who will be masqueraded as.
+ *
+ * @see hook_masquerade_began()
+ */
+function hook_masquerade_began($current_user, $new_user) {
+}
+
+/**
+ * Implements hook_masquerade_to_end().
+ *
+ * Identifies when a user is about to stop masquerading.
+ *
+ * @param $current_user
+ *  A fully loaded user account of the person who is masquerading.
+ * @param $original_user
+ *  A fully loaded user account of the person who the masquerader will become.
+ *
+ * @see hook_masquerade_ended()
+ */
+function hook_masquerade_to_end($current_user, $original_user) {
+}
+
+/**
+ * Implements hook_masquerade_ended().
+ *
+ * Identifies when a user has stopped masquerading as someone else.
+ *
+ * @param $current_user
+ *  A fully loaded user account of the person who is masquerading.
+ * @param $original_user
+ *  A fully loaded user account of the person who the masquerader will become.
+ *
+ * @see hook_masquerade_ended()
+ */
+function hook_masquerade_ended($current_user, $original_user) {
+}
diff --git a/masquerade.module b/masquerade.module
index 9e990c8..aa688b7 100644
--- a/masquerade.module
+++ b/masquerade.module
@@ -18,6 +18,32 @@ function masquerade_help($path, $arg) {
 }
 
 /**
+ * Implements hook_hook_info().
+ *
+ * Identifies the hooks exposed by masquerade.
+ *
+ * @see hook_hook_info()
+ */
+function masquerade_hook_info() {
+  $group = 'masquerade';
+  $hooks = array(
+    'masquerade_to_begin' => array(
+      'group' => $group,
+    ),
+    'masquerade_to_end' => array(
+      'group' => $group,
+    ),
+    'masquerade_began' => array(
+      'group' => $group,
+    ),
+    'masquerade_ended' => array(
+      'group' => $group,
+    ),
+  );
+  return $hooks;
+}
+
+/**
  * Implements hook_permission().
  *
  * @return array
@@ -360,12 +386,17 @@ function masquerade_user_logout($account) {
     global $user;
     cache_clear_all($user->uid, 'cache_menu', TRUE);
     $real_user = user_load($user->masquerading);
+    // Let other modules identify when the masquerade is about to end.
+    module_invoke_all('masquerade_to_end', $user, $real_user);
     watchdog('masquerade', "User %user no longer masquerading as %masq_as.", array('%user' => $real_user->name, '%masq_as' => $user->name), WATCHDOG_INFO);
 
     $query = db_delete('masquerade');
     $query->condition('sid', session_id());
     $query->condition('uid_as', $account->uid);
     $query->execute();
+
+    // Let other modules identify when the masquerade finished.
+    module_invoke_all('masquerade_ended', $user, $real_user);
   }
 }
 
@@ -786,6 +817,9 @@ function masquerade_switch_user($uid) {
     return FALSE;
   }
 
+  // Allow other modules to identify when the masquerade is about to start.
+  module_invoke_all('masquerade_to_begin', $user, $new_user);
+
   $query = db_insert('masquerade');
   $query->fields(array(
     'uid_from' => $user->uid,
@@ -798,7 +832,13 @@ function masquerade_switch_user($uid) {
   watchdog('masquerade', 'User %user now masquerading as %masq_as.', array('%user' => $user->name, '%masq_as' => $new_user->name ? $new_user->name : variable_get('anonymous', t('Anonymous'))), WATCHDOG_INFO);
   drupal_set_message(t('You are now masquerading as !masq_as.', array('!masq_as' => theme('username', array('account' => $new_user)))));
   $user->masquerading = $new_user->uid;
+
+  // Allow other modules to identify when the masquerade started.
+  module_invoke_all('masquerade_began', $user, $new_user);
+
+  // Finalize the switch.
   $user = $new_user;
+
   return TRUE;
 }
 
@@ -837,6 +877,13 @@ function masquerade_switch_back() {
   $query->condition($conditions);
   $query->execute();
   $oldname = ($user->uid == 0 ? variable_get('anonymous', t('Anonymous')) : $user->name);
-  $user = user_load($uid);
+  $current_user = $user;
+  $resume_user = user_load($uid);
+  // Allow other modules to identify when the masquerade is about to end.
+  module_invoke_all('masquerade_to_end', $current_user, $resume_user);
+  // Replace the global $user object.
+  $user = $resume_user;
+  // Allow other modules to identify when the masquerade ended.
+  module_invoke_all('masquerade_ended', $current_user, $user);
   watchdog('masquerade', 'User %user no longer masquerading as %masq_as.', array('%user' => $user->name, '%masq_as' => $oldname), WATCHDOG_INFO);
 }
