diff --git a/subpathauto.admin.inc b/subpathauto.admin.inc
index d18df86..f3d6bbb 100644
--- a/subpathauto.admin.inc
+++ b/subpathauto.admin.inc
@@ -26,5 +26,11 @@ function subpathauto_settings_form($form, &$form_state) {
     '#default_value' => variable_get('subpathauto_ignore_admin', 1),
   );
 
+  $form['subpathauto_allowed_paths'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Restrict the functionality of this module to paths that match the following patterns. No patterns means no restrictions.'),
+    '#default_value' => variable_get('subpathauto_allowed_paths', ''),
+  );
+
   return system_settings_form($form);
 }
diff --git a/subpathauto.install b/subpathauto.install
index d9f55d6..6670c1c 100644
--- a/subpathauto.install
+++ b/subpathauto.install
@@ -11,4 +11,5 @@
 function subpathauto_uninstall() {
   variable_del('subpathauto_ignore_admin');
   variable_del('subpathauto_depth');
+  variable_del('subpathauto_allowed_paths');
 }
diff --git a/subpathauto.module b/subpathauto.module
index 4fd2eda..6bb52e1 100644
--- a/subpathauto.module
+++ b/subpathauto.module
@@ -106,6 +106,12 @@ function subpathauto_lookup_subpath($action, $path = '', $original_path, $path_l
   if (!$max_depth) {
     return FALSE;
   }
+  
+  // Only allow Subpathauto for explicitly allowed paths (if there are any).
+  if ((variable_get('subpathauto_allowed_paths', '') != '') &&
+      !drupal_match_path($path, variable_get('subpathauto_allowed_paths', ''))) {
+    return FALSE;
+  }
 
   // If no language is explicitly specified we default to the current URL
   // language. If we used a language different from the one conveyed by the
