diff --git a/includes/command.inc b/includes/command.inc
index 6b5e256..69e9c22 100644
--- a/includes/command.inc
+++ b/includes/command.inc
@@ -573,7 +573,13 @@ function drush_get_commands() {
             $commands[$alias]['deprecated-name'] = $alias;
           }
         }
-
+        // Load config files specified in command hooks.
+        if (isset($commands[$key]['config'])) {
+          $config_prefix = $commands[$key]['config'];
+          foreach (drush_context_names() as $context) {
+            drush_load_config_file($context, _drush_config_file($context, $config_prefix));
+          }
+        }
       }
     }
   }
diff --git a/includes/context.inc b/includes/context.inc
index f1c30d2..b5bd389 100644
--- a/includes/context.inc
+++ b/includes/context.inc
@@ -88,8 +88,9 @@ function drush_context_names() {
  *   The keys are the 'context' of the files, the values are the file
  *   system locations.
  */
-function _drush_config_file($context) {
+function _drush_config_file($context, $prefix = NULL) {
   $configs = array();
+  $config_file = $prefix ? $prefix . '.' . 'drushrc.php' : 'drushrc.php';
 
   // Did the user explicitly specify a config file?
   if ($config = drush_get_option(array('c', 'config'))) {
@@ -100,28 +101,28 @@ function _drush_config_file($context) {
   }
 
   if ($site_path = drush_get_context('DRUSH_DRUPAL_SITE_ROOT')) {
-    $configs['site'] = $site_path . "/drushrc.php";
+    $configs['site'] = $site_path . "/" . $config_file;
   }
 
   if ($drupal_root = drush_get_context('DRUSH_DRUPAL_ROOT')) {
-    $configs['drupal'] = $drupal_root . '/drushrc.php';
+    $configs['drupal'] = $drupal_root . '/' . $config_file;
   }
 
   // in the user home directory
   if (!is_null(drush_server_home())) {
-    $configs['user'] = drush_server_home() . '/.drushrc.php';
+    $configs['user'] = drush_server_home() . '/.' . $config_file;
   }
 
   // in $HOME/.drush directory
   if (!is_null(drush_server_home())) {
-    $configs['home.drush'] = drush_server_home() . '/.drush/drushrc.php';
+    $configs['home.drush'] = drush_server_home() . '/.drush/' . $config_file;
   }
 
   // In the system wide configuration folder.
-  $configs['system'] = drush_get_context('ETC_PREFIX', '') . '/etc/drush/drushrc.php';
+  $configs['system'] = drush_get_context('ETC_PREFIX', '') . '/etc/drush/' . $config_file;
 
   // in the drush installation folder
-  $configs['drush'] = dirname(__FILE__) . '/../drushrc.php';
+  $configs['drush'] = dirname(__FILE__) . '/../' . $config_file;
 
   return empty($configs[$context]) ? '' : $configs[$context];
 }
