diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index 85bf324..f34a60c 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -1,11 +1,10 @@
 import os
 import sys
 from optparse import OptionParser, NO_DEFAULT
-import imp
 
 import django
 from django.core.management.base import BaseCommand, CommandError, handle_default_options
-from django.utils.importlib import import_module
+from django.utils.importlib import import_module, find_modules
 
 # For backwards compatibility: get_version() used to be in this module.
 get_version = django.get_version
@@ -39,7 +38,7 @@ def find_management_module(app_name):
     parts.append('management')
     parts.reverse()
     part = parts.pop()
-    path = None
+    paths = None
 
     # When using manage.py, the project module is added to the path,
     # loaded, then removed from the path. This means that
@@ -48,15 +47,17 @@ def find_management_module(app_name):
     # module, we need look for the case where the project name is part
     # of the app_name but the project directory itself isn't on the path.
     try:
-        f, path, descr = imp.find_module(part,path)
+        modules = find_modules(part, paths)
+        paths = [m[1] for m in modules]
     except ImportError,e:
         if os.path.basename(os.getcwd()) != part:
             raise e
 
     while parts:
         part = parts.pop()
-        f, path, descr = imp.find_module(part, path and [path] or None)
-    return path
+        modules = find_modules(part, paths)
+        paths = [m[1] for m in modules]
+    return paths[0]
 
 def load_command_class(app_name, name):
     """
diff --git a/django/utils/importlib.py b/django/utils/importlib.py
index ef4d0e4..1507a2b 100644
--- a/django/utils/importlib.py
+++ b/django/utils/importlib.py
@@ -1,5 +1,6 @@
 # Taken from Python 2.7 with permission from/by the original author.
 import sys
+import imp
 
 def _resolve_name(name, package, level):
     """Return the absolute name of the module to be imported."""
@@ -34,3 +35,29 @@ def import_module(name, package=None):
         name = _resolve_name(name[level:], package, level)
     __import__(name)
     return sys.modules[name]
+
+
+def find_modules(name, path=None):
+    """Find all modules with name 'name'
+    
+    Unlike find_module in the imp package this returns a list of all
+    matched modules.
+    """
+    results = []
+    if path is None: path = sys.path
+    for p in path:
+        importer = sys.path_importer_cache.get(p, None)
+        if importer is None:
+            find_module = imp.find_module
+        else:
+            find_module = importer.find_module
+        
+        try:
+            result = find_module(name, [p])
+            if result is not None:
+                results.append(result)
+        except ImportError:
+            pass
+    if not results:
+        raise ImportError("No module named %.200s" % name)
+    return results
diff --git a/tests/regressiontests/admin_scripts/lib1/nons_app/__init__.py b/tests/regressiontests/admin_scripts/lib1/nons_app/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nons_app/management/__init__.py b/tests/regressiontests/admin_scripts/lib1/nons_app/management/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nons_app/management/commands/__init__.py b/tests/regressiontests/admin_scripts/lib1/nons_app/management/commands/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nons_app/management/commands/nons_app_command1.py b/tests/regressiontests/admin_scripts/lib1/nons_app/management/commands/nons_app_command1.py
new file mode 100644
index 0000000..a393663
--- /dev/null
+++ b/tests/regressiontests/admin_scripts/lib1/nons_app/management/commands/nons_app_command1.py
@@ -0,0 +1,9 @@
+from django.core.management.base import BaseCommand
+
+class Command(BaseCommand):
+    help = 'Test managment commands in non-namespaced app'
+    requires_model_validation = False
+    args = ''
+
+    def handle(self, *labels, **options):
+        print 'EXECUTE:nons_app_command1'
diff --git a/tests/regressiontests/admin_scripts/lib1/nons_app/models.py b/tests/regressiontests/admin_scripts/lib1/nons_app/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/__init__.py b/tests/regressiontests/admin_scripts/lib1/nsapps/__init__.py
new file mode 100644
index 0000000..32f26d8
--- /dev/null
+++ b/tests/regressiontests/admin_scripts/lib1/nsapps/__init__.py
@@ -0,0 +1,6 @@
+# http://packages.python.org/distribute/setuptools.html#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/app1/__init__.py b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/__init__.py b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/commands/__init__.py b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/commands/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/commands/app1_command1.py b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/commands/app1_command1.py
new file mode 100644
index 0000000..2f479bb
--- /dev/null
+++ b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/management/commands/app1_command1.py
@@ -0,0 +1,9 @@
+from django.core.management.base import BaseCommand
+
+class Command(BaseCommand):
+    help = 'Test managment commands in namespaced apps'
+    requires_model_validation = False
+    args = ''
+
+    def handle(self, *labels, **options):
+        print 'EXECUTE:app1_command1'
diff --git a/tests/regressiontests/admin_scripts/lib1/nsapps/app1/models.py b/tests/regressiontests/admin_scripts/lib1/nsapps/app1/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/__init__.py b/tests/regressiontests/admin_scripts/lib2/nsapps/__init__.py
new file mode 100644
index 0000000..32f26d8
--- /dev/null
+++ b/tests/regressiontests/admin_scripts/lib2/nsapps/__init__.py
@@ -0,0 +1,6 @@
+# http://packages.python.org/distribute/setuptools.html#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/app2/__init__.py b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/__init__.py b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/commands/__init__.py b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/commands/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/commands/app2_command1.py b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/commands/app2_command1.py
new file mode 100644
index 0000000..b9e20a7
--- /dev/null
+++ b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/management/commands/app2_command1.py
@@ -0,0 +1,9 @@
+from django.core.management.base import BaseCommand
+
+class Command(BaseCommand):
+    help = 'Test managment commands in namespaced apps'
+    requires_model_validation = False
+    args = ''
+
+    def handle(self, *labels, **options):
+        print 'EXECUTE:app2_command1'
diff --git a/tests/regressiontests/admin_scripts/lib2/nsapps/app2/models.py b/tests/regressiontests/admin_scripts/lib2/nsapps/app2/models.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py
index 94d8f93..9a29808 100644
--- a/tests/regressiontests/admin_scripts/tests.py
+++ b/tests/regressiontests/admin_scripts/tests.py
@@ -84,6 +84,8 @@ class AdminScriptTestCase(unittest.TestCase):
         test_dir = os.path.dirname(os.path.dirname(__file__))
         project_dir = os.path.dirname(test_dir)
         base_dir = os.path.dirname(project_dir)
+        lib1_dir = os.path.join(os.path.dirname(__file__), 'lib1')
+        lib2_dir = os.path.join(os.path.dirname(__file__), 'lib2')
         ext_backend_base_dirs = self._ext_backend_paths()
 
         # Remember the old environment
@@ -101,7 +103,7 @@ class AdminScriptTestCase(unittest.TestCase):
             os.environ['DJANGO_SETTINGS_MODULE'] = settings_file
         elif 'DJANGO_SETTINGS_MODULE' in os.environ:
             del os.environ['DJANGO_SETTINGS_MODULE']
-        python_path = [test_dir, base_dir]
+        python_path = [test_dir, base_dir, lib1_dir, lib2_dir]
         python_path.extend(ext_backend_base_dirs)
         os.environ[python_path_var_name] = os.pathsep.join(python_path)
 
@@ -1197,3 +1199,35 @@ class ArgumentOrder(AdminScriptTestCase):
         out, err = self.run_manage(args)
         self.assertNoOutput(err)
         self.assertOutput(out, "EXECUTE:BaseCommand labels=('testlabel',), options=[('option_a', 'x'), ('option_b', 'y'), ('option_c', '3'), ('pythonpath', None), ('settings', 'alternate_settings'), ('traceback', None), ('verbosity', '1')]")
+
+
+class NamespacePackagedApps(AdminScriptTestCase):
+    def setUp(self):
+        self.write_settings('settings.py', apps=['nons_app', 'nsapps.app1','nsapps.app2'])
+        
+    def tearDown(self):
+        self.remove_settings('settings.py')
+
+    def test_help(self):
+        out, err = self.run_manage(['help'])
+        self.assertOutput(err, "nons_app_command1")
+        self.assertOutput(err, "app1_command1")
+        self.assertOutput(err, "app2_command1")
+
+    def test_nons_app(self):
+        args = ['nons_app_command1']
+        out, err = self.run_manage(args)
+        self.assertNoOutput(err)
+        self.assertOutput(out, "EXECUTE:nons_app_command1")
+
+    def test_nsapps(self):
+        args = ['app1_command1']
+        out, err = self.run_manage(args)
+        self.assertNoOutput(err)
+        self.assertOutput(out, "EXECUTE:app1_command1")
+
+        args = ['app2_command1']
+        out, err = self.run_manage(args)
+        self.assertNoOutput(err)
+        self.assertOutput(out, "EXECUTE:app2_command1")
+
