diff --git a/admin_menu_source.inc b/admin_menu_source.inc
index 8fe6245..1a5ed09 100644
--- a/admin_menu_source.inc
+++ b/admin_menu_source.inc
@@ -5,34 +5,82 @@
  */
 
 function admin_menu_source_settings() {
-  $roles = user_roles();
+  $roles = user_roles(TRUE, 'access administration menu');
   $menus = menu_get_menus();
   $default_values = _admin_menu_source_get_settings();
+
   $form['#theme'] = 'admin_menu_source_settings_form';
-  
+
+  $form['admin_menu_source_description'] = array(
+    '#markup' => t('Configure the source for the administration menu.'),
+  );
+
   $form['admin_menu_source_settings'] = array(
     '#tree' => TRUE,
     '#title' => t('Menu source per role'),
+    '#sorted' => FALSE,
   );
-  
-  foreach ($roles as $rid => $role) {
+
+  foreach ($default_values as $rid => $setting) {
+    if (empty($roles[$rid])) {
+      continue;
+    }
     $form['admin_menu_source_settings'][$rid]['role'] = array(
-      '#markup' => $role
+      '#markup' => check_plain($roles[$rid]),
+    );
+    $form['admin_menu_source_settings'][$rid]['rid'] = array(
+      '#type' => 'hidden',
+      '#value' => $rid,
     );
     $form['admin_menu_source_settings'][$rid]['source'] = array(
       '#type' => 'select',
       '#options' => array('' => t('Default')) + $menus,
-      '#default_value' => isset($default_values[$rid]['source']) ? $default_values[$rid]['source'] : '',
+      '#default_value' => isset($setting['source']) ? $setting['source'] : '',
+    );
+    $form['admin_menu_source_settings'][$rid]['weight'] = array(
+      '#type' => 'weight',
+      '#title' => t('Weight'),
+      '#default_value' => isset($setting['weight']) ? $setting['weight'] : 0,
+      '#title_display' => 'invisible',
     );
+    $form['admin_menu_source_settings'][$rid]['#weight'] =  isset($setting['weight']) ? $setting['weight'] : 0;
   }
-  
+
+  $form = system_settings_form($form);
+
   // Add a custom submit handler.
   $form['#submit'][] = 'admin_menu_source_settings_submit';
-  
-  return system_settings_form($form);
+
+  return $form;
 }
 
 function admin_menu_source_settings_submit() {
+  $settings = _admin_menu_source_get_settings();
+
+  // Sort the settings based on their weight.
+  uasort($settings, '_admin_menu_source_sort_by_roles');
+
+  // normalize weights
+  $weight = 0;
+  foreach ($settings as $key => $setting) {
+    $settings[$key]['weight'] = $weight;
+    $weight++;
+  }
+
+  // re-save
+  variable_set('admin_menu_source_settings', $settings);
+
   // Flush admin_menu's cache.
   admin_menu_flush_caches();
 }
+
+/**
+ * Implementation of a uasort compatible sorter function.
+ * Helper function to sort roles based on their weight
+ */
+function _admin_menu_source_sort_by_roles($a, $b) {
+  if ($a['weight'] == $b['weight']) {
+    return 0;
+  }
+  return ($a['weight'] < $b['weight']) ? -1 : 1;
+}
diff --git a/admin_menu_source.module b/admin_menu_source.module
index f8c2990..16167ab 100644
--- a/admin_menu_source.module
+++ b/admin_menu_source.module
@@ -19,12 +19,12 @@ function admin_menu_source_help($path, $arg) {
  */
 function admin_menu_source_menu() {
   $items = array();
-  
+
   $items['admin/config/administration/admin_menu/settings'] = array(
     'title' => 'Settings',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
-  
+
   $items['admin/config/administration/admin_menu/source'] = array(
     'title' => 'Source',
     'description' => 'Configure the source for the administration menu.',
@@ -34,7 +34,7 @@ function admin_menu_source_menu() {
     'type' => MENU_LOCAL_TASK,
     'file' => 'admin_menu_source.inc',
   );
-  
+
   return $items;
 }
 
@@ -54,17 +54,23 @@ function admin_menu_source_theme() {
  */
 function admin_menu_source_admin_menu_output_alter(&$content) {
   global $user;
-  
+
   // $rid = key(array_reverse($user->roles, TRUE));
 
   // Find the user role rid.
   $roles_ids = array_keys(user_roles(TRUE, 'access administration menu'));
   $user_roles_ids = array_keys($user->roles);
-  $user_roles = array_reverse(array_intersect($roles_ids, $user_roles_ids));
+  $user_roles = array_intersect($roles_ids, $user_roles_ids);
 
   if (count($user_roles)) {
-    $rid = $user_roles[0];
-    $source_menu = _admin_menu_source_get_role_menu($rid);
+    $settings = _admin_menu_source_get_settings();
+
+    $source_menu = '';
+    foreach ($settings as $source) {
+      if (in_array($source['rid'], $user_roles, TRUE)) {
+        $source_menu = $source['source'];
+      }
+    }
 
     if (!empty($source_menu)) {
       $content['menu'] = admin_menu_links_menu(admin_menu_tree($source_menu));
@@ -85,41 +91,62 @@ function admin_menu_source_admin_menu_output_alter(&$content) {
  * @ingroup themeable
  */
 function theme_admin_menu_source_settings_form($variables) {
-  $output = '';
   $form = $variables['form'];
-  
+  $output = drupal_render($form['admin_menu_source_description']);
+
   $rows = array();
   if (!empty($form['admin_menu_source_settings'])) {
     foreach (element_children($form['admin_menu_source_settings']) as $key) {
+      // Identifier for drupal_add_tabledrag call
+      $form['admin_menu_source_settings'][$key]['weight']['#attributes']['class'] = array('role-weight');
+
       $rows[] = array(
-        drupal_render($form['admin_menu_source_settings'][$key]['role']),
-        drupal_render($form['admin_menu_source_settings'][$key]['source']),
+        'data' => array(
+          drupal_render($form['admin_menu_source_settings'][$key]['role']),
+          drupal_render($form['admin_menu_source_settings'][$key]['source']),
+          drupal_render($form['admin_menu_source_settings'][$key]['weight']),
+        ),
+        'class' => array(
+          'draggable',
+        ),
       );
     }
   }
-  $output .= theme('table', array('header' => array(t('Role'), t('Menu')), 'rows' => $rows));
+  $headers = array(t('Role'), t('Menu'), t('Weight'));
+  $table_id = drupal_html_id('admin-menu-source-settings');
+  $output .= theme('table', array(
+    'header' => $headers,
+    'rows' => $rows,
+    'attributes' => array('id' => $table_id),
+  ));
   $output .= drupal_render($form['submit']);
   $output .= drupal_render_children($form);
-  
+
+  // The javascript magic that makes dragging work!
+  drupal_add_tabledrag($table_id, 'order', 'sibling', 'role-weight');
+
   return $output;
 }
 
 /**
  * Helper function to get settings for admin_menu_source.
+ * It assumes the settings are already sorted
+ * It appends new roles to the bottom (lowest priority)
  */
 function _admin_menu_source_get_settings() {
-  return variable_get('admin_menu_source_settings', array());
-}
+  $settings = variable_get('admin_menu_source_settings', array());
 
-/**
- * Helper function to get source menu per role.
- *
- * @param $rid
- *  the user role id
- */
-function _admin_menu_source_get_role_menu($rid) {
-  // Load the settings.
-  $settings = _admin_menu_source_get_settings();
-  
-  return isset($settings[$rid]['source']) ? $settings[$rid]['source'] : '';
-}
\ No newline at end of file
+  // make sure all roles are in
+  $roles_ids = array_keys(user_roles(TRUE, 'access administration menu'));
+  foreach ($roles_ids as $rid) {
+    if (empty($settings[$rid])) {
+      $settings[$rid] = array(
+        'rid' => $rid,
+        'source' => '',
+        'weight' => 10000, // new roles go to the bottom
+      );
+    }
+  }
+
+  return $settings;
+}
