diff --git a/field_group.api.php b/field_group.api.php
index 5c91f73..0a1bc1b 100644
--- a/field_group.api.php
+++ b/field_group.api.php
@@ -309,6 +309,29 @@ function hook_field_group_build_pre_render_alter(& $element) {
 }
 
 /**
+ * Implements hook_field_group_attach_groups_alter().
+ * Function that allows you to change group information before the element is pre rendered and processed.
+ * @param Array $groups by address.
+ */
+function hook_field_group_attach_groups_alter(&$groups) {
+  // example: change ordering of the groups in the element, if you have a custom implementation of Field Group types.
+  // remove them from the array, then attach them to the end of the groups array.
+  $types = array('mymodule_group_type_1', 'mymodule_group_type_2');
+  $parents = array();
+
+  foreach ($groups as $key => $group) {
+    if (in_array($group->format_type, $types)) {
+      unset($groups[$key]);
+      $parents[$key] = $group;
+    }
+  }
+
+  if (count($parents)) {
+    $groups += $parents;
+  }
+}
+
+/**
  * Implements hook_field_group_format_summary().
  *
  * Place to override or change default summary behavior. In most
diff --git a/field_group.module b/field_group.module
index ab1ff26..1e8a3e4 100644
--- a/field_group.module
+++ b/field_group.module
@@ -63,13 +63,13 @@ function field_group_menu() {
             'file' => 'field_group.field_ui.inc',
           ) + $access;
 
-          $items["$path/groups/%field_group_menu/enable"] = array(
-            'load arguments' => array($entity_type, $bundle_arg, $bundle_pos, '%map'),
-            'title' => 'Enable',
-            'page callback' => 'drupal_get_form',
-            'page arguments' => array('field_group_enable_form', $group_position),
-            'type' => MENU_CALLBACK,
-            'file' => 'field_group.field_ui.inc',
+          $items["$path/groups/%field_group_menu/enable"] = array(
+            'load arguments' => array($entity_type, $bundle_arg, $bundle_pos, '%map'),
+            'title' => 'Enable',
+            'page callback' => 'drupal_get_form',
+            'page arguments' => array('field_group_enable_form', $group_position),
+            'type' => MENU_CALLBACK,
+            'file' => 'field_group.field_ui.inc',
           ) + $access;
 
         }
@@ -1657,6 +1657,9 @@ function field_group_attach_groups(&$element, $view_mode, $form_state = array())
   }
   $element['#group_children'] = $group_children;
 
+  // Give modules a chance to change group information in the element, like group ordering.
+  drupal_alter('field_group_attach_groups', $element['#groups']);
+
   // Add a pre render callback.
   // This is needed since process seems too early for the front view modes.
   // This is main bottleneck in field_group. By using this, we can't process
