diff --git a/flag.inc b/flag.inc
index 6008c3f..cd343b4 100644
--- a/flag.inc
+++ b/flag.inc
@@ -9,8 +9,30 @@
  * Destination class implementing when you want just an insert into flag_content table.
  */
 class MigrateDestinationFlagSimple extends MigrateDestination {
+
+
+  protected $table_name;
+  protected $flagging_id;
+  protected $entity_type;
+  protected $entity_id;
+
+
   public function __construct($fid) {
     parent::__construct();
+
+    if (FLAG_API_VERSION == 3) {
+      $this->table_name = 'flagging';
+      $this->entity_id = 'entity_id';
+      $this->entity_type = 'entity_type';
+      $this->flagging_id = 'flagging_id';
+    }
+    else {
+      $this->table_name = 'flag_content';
+      $this->entity_id = 'content_type';
+      $this->entity_type = 'content_id';
+      $this->flagging_id = 'fcid';
+    }
+
     $this->fid = $fid;
   }
 
@@ -20,8 +42,18 @@ class MigrateDestinationFlagSimple extends MigrateDestination {
   }
 
   static public function getKeySchema() {
+
+    if (FLAG_API_VERSION == 3) {
+
+      $flagging_id = 'flagging_id';
+    }
+    else {
+      $flagging_id = 'fcid';
+    }
+
+
     return array(
-      'fcid' => array(
+      $flagging_id => array(
         'type' => 'int',
         'not null' => TRUE,
       ),
@@ -36,9 +68,11 @@ class MigrateDestinationFlagSimple extends MigrateDestination {
    */
   public function bulkRollback(array $ids) {
     migrate_instrument_start(__METHOD__);
-    db_delete('flag_content')
-      ->condition('fcid', $ids, 'IN')
+
+    db_delete($this->table_name)
+      ->condition($this->flagging_id, $ids, 'IN')
       ->execute();
+
     migrate_instrument_stop(__METHOD__);
   }
 
@@ -54,51 +88,75 @@ class MigrateDestinationFlagSimple extends MigrateDestination {
    *  successful. FALSE on failure.
    */
   public function import(stdClass $entity, stdClass $row) {
+
+
+    // Updating previously-migrated content?
+    if (isset($row->migrate_map_destid1)) {
+      if (isset($entity->{$this->flagging_id})) {
+        if ($entity->{$this->flagging_id} != $row->migrate_map_destid1) {
+          throw new MigrateException(t("Incoming id !id and map destination id !destid don't match.",
+            array('!id' => $entity->{$this->flagging_id}, '!destid' => $row->migrate_map_destid1)));
+        }
+      }
+      else {
+        $entity->{$this->flagging_id} = $row->migrate_map_destid1;
+      }
+    }
+    // Otherwise, clear out the fcid, just to be safe.
+    else {
+      unset($entity->{$this->flagging_id});
+    }
+
+
     if (isset($entity->timestamp)) {
       $entity->timestamp = Migration::timestamp($entity->timestamp);
     }
 
     $entity->fid = $this->fid;
 
-    if (!empty($entity->fcid)) {
-      $return = drupal_write_record('flag_content', $entity, 'fcid');
+    if (!empty($entity->{$this->flagging_id})) {
+      $return = drupal_write_record($this->table_name, $entity, array($this->flagging_id));
     }
     else {
-      $return = drupal_write_record('flag_content', $entity);
+      $return = drupal_write_record($this->table_name, $entity);
     }
     if ($return) {
+      // Increment the number of updated or inserted records by checking the
+      // result of drupal_write_record.
+      ($return == SAVED_NEW) ? $this->numCreated++ : $this->numUpdated++;
+
       // Update the flag_counts table.
-      $count = db_select('flag_content')
-        ->fields('flag_content')
+      $count = db_select($this->table_name)
+        ->fields($this->table_name)
         ->condition('fid', $this->fid)
-        ->condition('content_type', $entity->content_type)
-        ->condition('content_id', $entity->content_id)
+        ->condition($this->entity_type, $entity->{$this->entity_type})
+        ->condition($this->entity_id, $entity->{$this->entity_id})
         ->countQuery()
         ->execute()
         ->fetchField();
       db_merge('flag_counts')
         ->key(array(
           'fid' => $this->fid,
-          'content_id' => $entity->content_id,
+          $this->entity_id => $entity->{$this->entity_id},
         ))
         ->fields(array(
-          'content_type' => $entity->content_type,
+          $this->entity_type => $entity->{$this->entity_type},
           'count' => $count,
           'last_updated' => REQUEST_TIME,
         ))
         ->execute();
-      return array($entity->fcid);
+      return array($entity->{$this->flagging_id});
     }
   }
 
   public function fields() {
     return array(
-        'fcid' => 'Flag content ID',
-        'fid' => 'Flag ID',
-        'content_type' => '',
-        'content_id' => '',
-        'uid' => 'User ID',
-        'timestamp' => '',
+      $this->flagging_id => 'Flag content ID',
+      'fid' => 'Flag ID',
+      $this->entity_type => '',
+      $this->entity_id => '',
+      'uid' => 'User ID',
+      'timestamp' => '',
     );
   }
 }
@@ -133,7 +191,9 @@ class MigrateExtrasNodeFlagHandler extends MigrateExtrasFlagHandler {
   }
 
   public function complete($node, stdClass $row) {
-    if (!module_exists('flag')) return;
+    if (!module_exists('flag')) {
+      return;
+    }
 
     $flags = flag_get_flags('node', $node->type);
     $fields = array();
@@ -151,7 +211,9 @@ class MigrateExtrasUserFlagHandler extends MigrateExtrasFlagHandler {
   }
 
   public function complete($user, stdClass $row) {
-    if (!module_exists('flag')) return;
+    if (!module_exists('flag')) {
+      return;
+    }
 
     $flags = flag_get_flags('user', 'user');
     $fields = array();
@@ -162,3 +224,23 @@ class MigrateExtrasUserFlagHandler extends MigrateExtrasFlagHandler {
     }
   }
 }
+
+class MigrateExtrasTaxonomyFlagHandler extends MigrateExtrasFlagHandler {
+  public function __construct() {
+    $this->registerTypes(array('taxonomy_term'));
+  }
+
+  public function complete($term, stdClass $row) {
+    if (!module_exists('flag')) return;
+
+    $flags = flag_get_flags('taxonomy_term', $term->vocabulary_machine_name);
+    $fields = array();
+    
+    foreach ($flags as $flag_name => $flag) {
+      if (!empty($term->$flag_name)) {
+        flag('flag', $flag_name, $term->tid);
+      }
+    }
+    
+  }
+}
\ No newline at end of file
diff --git a/migrate_extras.migrate.inc b/migrate_extras.migrate.inc
index f08a844..33b79e2 100644
--- a/migrate_extras.migrate.inc
+++ b/migrate_extras.migrate.inc
@@ -10,6 +10,7 @@ function migrate_extras_migrate_api() {
       'MigratePathautoHandler',
       'MigrateExtrasNodeFlagHandler',
       'MigrateExtrasUserFlagHandler',
+      'MigrateExtrasTaxonomyFlagHandler',
     ),
     'field handlers' => array(
       'MigrateCckPhoneHandler',
