diff --git a/twitter_backlog/twitter_backlog.info b/twitter_backlog/twitter_backlog.info
new file mode 100644
index 0000000..90bb814
--- /dev/null
+++ b/twitter_backlog/twitter_backlog.info
@@ -0,0 +1,4 @@
+name = Twitter backlog
+description = Imports a user's backlog of Twitter status messages, prior to the 20 messages imported by the Twitter module by default.
+core = 6.x
+dependencies[] = twitter
diff --git a/twitter_backlog/twitter_backlog.module b/twitter_backlog/twitter_backlog.module
new file mode 100644
index 0000000..c465d64
--- /dev/null
+++ b/twitter_backlog/twitter_backlog.module
@@ -0,0 +1,148 @@
+<?php
+
+/**
+ * Implementation of hook_menu().
+ */
+function twitter_backlog_menu() {
+  $items['user/%user/edit/twitter/backlog/%'] = array(
+    'title' => 'Twitter backlog batch',
+    'access callback' => TRUE,
+    'page callback' => 'twitter_backlog_page',
+    'page arguments' => array(1, 5),
+    'type' => MENU_CALLBACK,
+  );
+
+  return $items;
+}
+
+function twitter_backlog_page($account, $twitter_uid) {
+  $batch = array(
+    'operations' => array(),
+    'finished' => 'twitter_backlog_batch_finished',
+    'title' => t('Batch Processing Scores'),
+    'init_message' => t('Starting...'),
+    'progress_message' => '',
+    'error_message' => t('An error occurred and some or all of the batch has failed.'),
+   );
+
+  $batch['operations'][] = array('twitter_backlog_batch_1', array(200, $account, $twitter_uid));
+
+   if (!empty($batch['operations'])) {
+     batch_set($batch);
+     // batch_process() only needed if not inside a form _submit handler :
+     batch_process('user/'. $account->uid .'/edit/twitter');
+   }
+}
+
+function twitter_backlog_batch_1($limit, $account, $twitter_uid, $context) {
+  module_load_include('inc', 'twitter');
+
+  if (!isset($context['sandbox']['progress'])) {
+    $context['sandbox']['progress'] = 0;
+    $context['sandbox']['max'] = 3200;
+    $context['sandbox']['run_count'] = 0;
+    $context['sandbox']['max_id'] = db_result(db_query('SELECT twitter_id FROM `twitter` ORDER BY twitter_id ASC LIMIT 1'));
+  }
+  $context['sandbox']['run_count']++;
+
+  $twitter_account = twitter_account_load($twitter_uid);
+  $twitter = twitter_connect($twitter_account);
+
+  $params = array();
+  $params['count'] = $limit;
+  $params['page'] = $context['sandbox']['run_count'];
+  if ($context['sandbox']['max_id']) {
+    $params['max_id'] = $context['sandbox']['max_id'];
+  }
+  if ($twitter_account->include_retweets) {
+    $params['include_rts'] = true;
+  }
+
+  $statuses = $twitter->user_timeline($twitter_account->id, $params, $twitter_account->protected);
+  if (count($statuses) === 0) {
+    $context['finished'] = 1;
+    return;
+  }
+  foreach ($statuses as $status) {
+    twitter_status_save($status);
+    $context['results'][] = $status->id;
+  }
+  $context['sandbox']['progress'] = $context['sandbox']['progress'] + $limit;
+
+  // Inform the batch engine that we are not finished,
+  // and provide an estimation of the completion level we reached.
+  if ($context['sandbox']['progress'] < $context['sandbox']['max']) {
+    $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
+  }
+}
+
+function twitter_backlog_theme_registry_alter(&$theme_registry) {
+  $theme_registry['twitter_account_list_form']['function'] = 'twitter_backlog_twitter_account_list_form';
+}
+
+function twitter_backlog_batch_finished($success, $results, $operations) {
+  if ($success) {
+    $message = count($results) . ' status messages fetched.';
+  }
+  else {
+    // An error occurred.
+    // $operations contains the operations that remained unprocessed.
+    $error_operation = reset($operations);
+    $message = t('An error occurred while processing %error_operation with arguments: @arguments', array('%error_operation' => $error_operation[0], '@arguments' => print_r($error_operation[1], TRUE)));
+  }
+  drupal_set_message($message);
+}
+
+function twitter_backlog_twitter_account_list_form($form) {
+
+  if (user_access('import own tweets')) {
+    $header = array('', t('Name'), t('Description'), t('Private'), t('Import'), t('Retweets'), t('Delete'));
+  }else {
+    $header = array('', t('Name'), t('Description'), t('Private'), t('z'));
+  }
+
+  if (user_access('make twitter accounts global')) {
+    $header[] = '';
+  }
+
+  $rows = array();
+
+  foreach (element_children($form['accounts']) as $key) {
+    $element = &$form['accounts'][$key];
+    if (user_access('import own tweets')) {
+      $row = array(
+      drupal_render($element['image']),
+      drupal_render($element['id']) . drupal_render($element['screen_name']) . drupal_render($element['visible_name']),
+      drupal_render($element['description']),
+      drupal_render($element['protected']),
+      drupal_render($element['import']),
+      drupal_render($element['include_retweets']),
+      drupal_render($element['delete']),
+      );
+    }else {
+      $row = array(
+      drupal_render($element['image']),
+      drupal_render($element['id']) . drupal_render($element['screen_name']) . drupal_render($element['visible_name']),
+      drupal_render($element['description']),
+      drupal_render($element['protected']),
+      drupal_render($element['delete']),
+      );
+    }
+
+    if (user_access('make twitter accounts global')) {
+      $label = ($element['#account']->is_global) ? t('remove global') : t('make global');
+      $row[] = l($label, 'user/'. $element['#account']->uid .'/edit/twitter/global/'. $element['#account']->id);
+    }
+
+    if (user_access('import own tweets')) {
+      $label = t('import backlog');
+      $row[] = l($label, 'user/'. $element['#account']->uid .'/edit/twitter/backlog/'. $element['#account']->id);
+    }
+
+    $rows[] = $row;
+  }
+
+  $output = theme('table', $header, $rows);
+  $output .= drupal_render($form);
+  return $output;
+}
