diff --git a/addressfield.info b/addressfield.info
index c074380..07ca4c2 100644
--- a/addressfield.info
+++ b/addressfield.info
@@ -6,3 +6,5 @@ package = Fields
 dependencies[] = ctools
 
 files[] = views/addressfield_views_handler_filter_country.inc
+files[] = addressfield.tokens.inc
+
diff --git a/addressfield.module b/addressfield.module
index 177d92b..189ec2d 100644
--- a/addressfield.module
+++ b/addressfield.module
@@ -745,3 +745,33 @@ function _addressfield_country_options_list($field = NULL, $instance = NULL) {
 
   return $countries;
 }
+
+/**
+ * Find all fields that are addressfields.
+ */
+function addressfield_get_address_fields() {
+  $fields = field_info_fields();
+  
+  // Detect which fields are address fields.
+  $address_fields = array();
+  foreach ($fields as $field_name => $field) {
+    if ($fields[$field_name]['type'] == 'addressfield') {
+      $address_fields[] = $field_name;
+    }
+  }
+  return $address_fields;
+}
+
+/**
+ * Implements hook_module_implements_alter().
+ * Adjusts module weight.
+ */
+function addressfield_module_implements_alter(&$implementations, $hook) {
+  if ($hook == 'token_info_alter') {
+    // Move address field to the end.
+    unset($implementations['addressfield']);
+    $implementations['addressfield'] = FALSE;
+  }
+}
+
+
diff --git a/addressfield.tokens.inc b/addressfield.tokens.inc
new file mode 100644
index 0000000..fb2d11c
--- /dev/null
+++ b/addressfield.tokens.inc
@@ -0,0 +1,103 @@
+<?php
+
+/**
+ * @file
+ * Token module integration.
+ */
+ 
+/**
+ * Implements hook_token_info().
+ */
+function addressfield_token_info() {
+  
+  $type = array(
+    'name' => t('Addressfield fields'),
+    'description' => t('Tokens related to addressfield field instances.'),
+    'needs-data' => 'addressfield-field',
+    'field' => TRUE,
+  );
+  
+  $info['country-code'] = array(
+    'name' => t('Country code'),
+    'description' => t('The country code value.'),
+  );
+  
+  $info['country-name'] = array(
+    'name' => t('Country name'),
+    'description' => t('The country name value.'),
+  );
+  
+  return array(
+    'types' => array('addressfield-field' => $type),
+    'tokens' => array('addressfield-field' => $info),
+  );
+}
+
+/**
+ * Implements hook_tokens().
+ */
+function addressfield_tokens($type, $tokens, array $data = array(), array $options = array()) {
+  
+  if (isset($options['language'])) {
+    $url_options['language'] = $options['language'];
+    $language_code = $options['language']->language;
+  }
+  else {
+    $language_code = LANGUAGE_NONE;
+  }
+  
+  $replacements = array();
+  
+  if ($type == 'addressfield-field') {
+    if (isset($data['addressfield-field'][$language_code][0])) {
+
+      foreach ($tokens as $name => $original) {
+        switch ($name) {
+          case 'country-code':
+            $replacements[$original] = t($data['addressfield-field'][$language_code][0]['country']);
+            break;
+
+          case 'country-name':
+            $countries = _addressfield_country_options_list();
+            $replacements[$original] = t($countries[$data['addressfield-field'][$language_code][0]['country']]);
+            break;
+        }
+      }
+    }
+  }
+  
+  if ($type == 'entity') {
+    // Find all address fields.
+    $address_fields = addressfield_get_address_fields();
+    
+    // Generate tokens using pattern above.
+    foreach ($address_fields as $field_name) {
+      if ($addressfield_tokens = token_find_with_prefix($tokens, $field_name)) {
+        $replacements += token_generate('addressfield-field', $addressfield_tokens, array('addressfield-field' => $data['entity']->$field_name), $options);
+      }
+    }
+  }
+  
+  return $replacements;
+}
+
+/**
+ * Implements hook_token_info_alter().
+ */
+function addressfield_token_info_alter(&$data) {
+  // Get the info on all fields.
+  $fields = field_info_fields();
+  
+  $address_fields = addressfield_get_address_fields();
+  
+  foreach ($address_fields as $field_name) {
+    foreach ($data['tokens'] as $bundle => $token){
+      if (isset($data['tokens'][$bundle][$field_name])) {
+        // Add a type to the address field.
+        $data['tokens'][$bundle][$field_name]['type'] = 'addressfield-field';
+      }
+    }
+  }
+  
+}
+
