diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py
index b3a3479..64847a4 100644
--- a/django/contrib/auth/management/commands/createsuperuser.py
+++ b/django/contrib/auth/management/commands/createsuperuser.py
@@ -6,10 +6,12 @@ import getpass
 import re
 import sys
 from optparse import make_option
+
 from django.contrib.auth.models import User
 from django.contrib.auth.management import get_default_username
 from django.core import exceptions
 from django.core.management.base import BaseCommand, CommandError
+from django.db import DEFAULT_DB_ALIAS
 from django.utils.translation import ugettext as _
 
 RE_VALID_USERNAME = re.compile('[\w.@+-]+$')
@@ -19,10 +21,12 @@ EMAIL_RE = re.compile(
     r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"' # quoted-string
     r')@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}$', re.IGNORECASE)  # domain
 
+
 def is_valid_email(value):
     if not EMAIL_RE.search(value):
         raise exceptions.ValidationError(_('Enter a valid e-mail address.'))
 
+
 class Command(BaseCommand):
     option_list = BaseCommand.option_list + (
         make_option('--username', dest='username', default=None,
@@ -34,6 +38,9 @@ class Command(BaseCommand):
                   'You must use --username and --email with --noinput, and '
                   'superusers created with --noinput will not be able to log '
                   'in until they\'re given a valid password.')),
+        make_option('--database', action='store', dest='database',
+            default=DEFAULT_DB_ALIAS, help='Nominates a database to save the user to. '
+                    'Defaults to the "default" database.'),
     )
     help = 'Used to create a superuser.'
 
@@ -42,6 +49,7 @@ class Command(BaseCommand):
         email = options.get('email', None)
         interactive = options.get('interactive')
         verbosity = int(options.get('verbosity', 1))
+        database = options.get('database')
 
         # Do quick and dirty validation if --noinput
         if not interactive:
@@ -114,7 +122,7 @@ class Command(BaseCommand):
                 sys.stderr.write("\nOperation cancelled.\n")
                 sys.exit(1)
 
-        User.objects.create_superuser(username, email, password)
+        User.objects.db_manager(database).create_superuser(username, email, password)
         if verbosity >= 1:
           self.stdout.write("Superuser created successfully.\n")
 
diff --git a/django/contrib/auth/tests/__init__.py b/django/contrib/auth/tests/__init__.py
index 7cb0dcb..86c5ce2 100644
--- a/django/contrib/auth/tests/__init__.py
+++ b/django/contrib/auth/tests/__init__.py
@@ -1,7 +1,7 @@
 from django.contrib.auth.tests.auth_backends import (BackendTest,
     RowlevelBackendTest, AnonymousUserBackendTest, NoBackendsTest,
     InActiveUserBackendTest, NoInActiveUserBackendTest)
-from django.contrib.auth.tests.basic import BasicTestCase, PasswordUtilsTestCase
+from django.contrib.auth.tests.basic import BasicTestCase, MultiDBTestCase, PasswordUtilsTestCase
 from django.contrib.auth.tests.context_processors import AuthContextProcessorTests
 from django.contrib.auth.tests.decorators import LoginRequiredTestCase
 from django.contrib.auth.tests.forms import (UserCreationFormTest,
diff --git a/django/contrib/auth/tests/basic.py b/django/contrib/auth/tests/basic.py
index 9f94c2a..98a20fb 100644
--- a/django/contrib/auth/tests/basic.py
+++ b/django/contrib/auth/tests/basic.py
@@ -1,9 +1,10 @@
+from StringIO import StringIO
+
 from django.test import TestCase
 from django.utils.unittest import skipUnless
 from django.contrib.auth.models import User, AnonymousUser
 from django.contrib.auth import utils
 from django.core.management import call_command
-from StringIO import StringIO
 
 try:
     import crypt as crypt_module
@@ -100,7 +101,6 @@ class BasicTestCase(TestCase):
         self.assertEqual(u.email, 'joe2@somewhere.org')
         self.assertFalse(u.has_usable_password())
 
-
         new_io = StringIO()
         call_command("createsuperuser",
             interactive=False,
@@ -113,6 +113,25 @@ class BasicTestCase(TestCase):
         self.assertFalse(u.has_usable_password())
 
 
+class MultiDBTestCase(TestCase):
+    multi_db = True
+
+    def test_createsuperuser_command_with_database_option(self):
+        " createsuperuser command should operate on specified DB"
+        new_io = StringIO()
+        call_command("createsuperuser",
+            interactive=False,
+            username="joe",
+            email="joe@somewhere.org",
+            database='other',
+            stdout=new_io
+        )
+        command_output = new_io.getvalue().strip()
+        self.assertEqual(command_output, 'Superuser created successfully.')
+        u = User.objects.using('other').get(username="joe")
+        self.assertEqual(u.email, 'joe@somewhere.org')
+
+
 class PasswordUtilsTestCase(TestCase):
 
     def _test_make_password(self, algo):
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 8b83a43..658b267 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1108,12 +1108,16 @@ a password has been manually set for it.
 
 .. django-admin-option:: --username
 .. django-admin-option:: --email
+.. django-admin-option:: --database
 
 The username and email address for the new account can be supplied by
 using the ``--username`` and ``--email`` arguments on the command
 line. If either of those is not supplied, ``createsuperuser`` will prompt for
 it when running interactively.
 
+The ``--database`` option can be used to specify the database into which the 
+superuser object will be saved.
+
 ``django.contrib.gis``
 ----------------------
 
