diff --git a/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
new file mode 100644
index 0000000..002c0d2
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
@@ -0,0 +1,7 @@
+name = "System incompatible core version dependencies test"
+description = "Support module for testing system dependencies."
+package = Testing
+version = VERSION
+core = 7.x
+hidden = TRUE
+dependencies[] = system_incompatible_core_version_test
diff --git a/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.module b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.module
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.module
@@ -0,0 +1 @@
+<?php
diff --git a/modules/simpletest/tests/system_incompatible_core_version_test.info b/modules/simpletest/tests/system_incompatible_core_version_test.info
new file mode 100644
index 0000000..ced53e9
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_core_version_test.info
@@ -0,0 +1,6 @@
+name = "System incompatible core version test"
+description = "Support module for testing system dependencies."
+package = Testing
+version = VERSION
+core = 5.x
+hidden = TRUE
diff --git a/modules/simpletest/tests/system_incompatible_core_version_test.module b/modules/simpletest/tests/system_incompatible_core_version_test.module
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_core_version_test.module
@@ -0,0 +1 @@
+<?php
diff --git a/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info
new file mode 100644
index 0000000..48db9ea
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info
@@ -0,0 +1,8 @@
+name = "System incompatible module version dependencies test"
+description = "Support module for testing system dependencies."
+package = Testing
+version = VERSION
+core = 7.x
+hidden = TRUE
+; system_incompatible_module_version_test declares version 1.0
+dependencies[] = system_incompatible_module_version_test (>2.0)
diff --git a/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.module b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.module
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.module
@@ -0,0 +1 @@
+<?php
diff --git a/modules/simpletest/tests/system_incompatible_module_version_test.info b/modules/simpletest/tests/system_incompatible_module_version_test.info
new file mode 100644
index 0000000..9dfc686
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_module_version_test.info
@@ -0,0 +1,6 @@
+name = "System incompatible module version test"
+description = "Support module for testing system dependencies."
+package = Testing
+version = 1.0
+core = 7.x
+hidden = TRUE
diff --git a/modules/simpletest/tests/system_incompatible_module_version_test.module b/modules/simpletest/tests/system_incompatible_module_version_test.module
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/modules/simpletest/tests/system_incompatible_module_version_test.module
@@ -0,0 +1 @@
+<?php
diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module
index 9516c91..8cb0e83 100644
--- a/modules/simpletest/tests/system_test.module
+++ b/modules/simpletest/tests/system_test.module
@@ -264,6 +264,14 @@ function system_test_system_info_alter(&$info, $file, $type) {
   if ($file->name == 'system_dependencies_test') {
     $info['hidden'] = FALSE;
   }
+  if (in_array($file->name, array(
+    'system_incompatible_module_version_dependencies_test',
+    'system_incompatible_core_version_dependencies_test',
+    'system_incompatible_module_version_test',
+    'system_incompatible_core_version_test',
+  ))) {
+    $info['hidden'] = FALSE;
+  }
   if ($file->name == 'requirements1_test' || $file->name == 'requirements2_test') {
     $info['hidden'] = FALSE;
   }
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index e250bf1..6368590 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -811,6 +811,7 @@ function system_modules($form, $form_state = array()) {
       // Only display visible modules.
       elseif (isset($visible_files[$requires])) {
         $requires_name = $files[$requires]->info['name'];
+        // Disable this module if it is incompatible with the dependency's version.
         if ($incompatible_version = drupal_check_incompatibility($v, str_replace(DRUPAL_CORE_COMPATIBILITY . '-', '', $files[$requires]->info['version']))) {
           $extra['requires'][$requires] = t('@module (<span class="admin-missing">incompatible with</span> version @version)', array(
             '@module' => $requires_name . $incompatible_version,
@@ -818,6 +819,14 @@ function system_modules($form, $form_state = array()) {
           ));
           $extra['disabled'] = TRUE;
         }
+        // Disable this module if the dependency is incompatible with this
+        // version of Drupal core.
+        elseif ($files[$requires]->info['core'] != DRUPAL_CORE_COMPATIBILITY) {
+          $extra['requires'][$requires] = t('@module (<span class="admin-missing">incompatible with</span> this version of Drupal core)', array(
+            '@module' => $requires_name,
+          ));
+          $extra['disabled'] = TRUE;
+        }
         elseif ($files[$requires]->status) {
           $extra['requires'][$requires] = t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => $requires_name));
         }
diff --git a/modules/system/system.test b/modules/system/system.test
index a00f51e..2e738af 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -422,6 +422,35 @@ class ModuleDependencyTestCase extends ModuleTestCase {
   }
 
   /**
+   * Tests enabling a module that depends on an incompatible version of a module.
+   */
+  function testIncompatibleModuleVersionDependency() {
+    // Test that the system_incompatible_module_version_dependencies_test is
+    // marked as having an incompatible dependency.
+    $this->drupalGet('admin/modules');
+    $this->assertRaw(t('@module (<span class="admin-missing">incompatible with</span> version @version)', array(
+      '@module' => 'System incompatible module version test (>2.0)',
+      '@version' => '1.0',
+    )), 'A module that depends on an incompatible version of a module is marked as such.');
+    $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="modules[Testing][system_incompatible_module_version_dependencies_test][enable]"]');
+    $this->assert(count($checkbox) == 1, t('Checkbox for the module is disabled.'));
+  }
+
+  /**
+   * Tests enabling a module that depends on a module with an incompatible core version.
+   */
+  function testIncompatibleCoreVersionDependency() {
+    // Test that the system_incompatible_core_version_dependencies_test is
+    // marked as having an incompatible dependency.
+    $this->drupalGet('admin/modules');
+    $this->assertRaw(t('@module (<span class="admin-missing">incompatible with</span> this version of Drupal core)', array(
+      '@module' => 'System incompatible core version test',
+    )), 'A module that depends on a module with an incompatible core version is marked as such.');
+    $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="modules[Testing][system_incompatible_core_version_dependencies_test][enable]"]');
+    $this->assert(count($checkbox) == 1, t('Checkbox for the module is disabled.'));
+  }
+
+  /**
    * Tests enabling a module that depends on a module which fails hook_requirements().
    */
   function testEnableRequirementsFailureDependency() {
