diff --git a/django/template/__init__.py b/django/template/__init__.py
index e60ff64..65880ae 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -59,6 +59,7 @@ from django.utils.encoding import smart_unicode, force_unicode
 from django.utils.translation import ugettext as _
 from django.utils.safestring import SafeData, EscapeData, mark_safe, mark_for_escaping
 from django.utils.html import escape
+from django.templatetags import get_app_label_and_modules 
 
 __all__ = ('Template', 'Context', 'RequestContext', 'compile_string')
 
@@ -913,22 +914,52 @@ class Library(object):
             return func
         return dec
 
-def get_library(module_name):
-    lib = libraries.get(module_name, None)
+def import_library(module_name):
+    try:
+        mod = __import__(module_name, {}, {}, [''])
+    except ImportError:
+        return None
+    try:
+        return mod.register
+    except AttributeError:
+        raise InvalidTemplateLibrary("Template library %s does not have a variable named 'register'" % module_name)
+
+def get_library(library_name):
+    lib = libraries.get(library_name, None)
     if not lib:
+
+        """ 
+        If library is not already loaded loop over all templatetags modules to locate it.
+
+        {% load somelib %} and {% load someotherlib %} loops twice.
+
+        Subsequent loads eg. {% load somelib %} in the same thread will grab the cached
+        module from libraries.
+        """
+
         try:
-            mod = __import__(module_name, {}, {}, [''])
-        except ImportError, e:
-            raise InvalidTemplateLibrary("Could not load template library from %s, %s" % (module_name, e))
-        try:
-            lib = mod.register
-            libraries[module_name] = lib
-        except AttributeError:
-            raise InvalidTemplateLibrary("Template library %s does not have a variable named 'register'" % module_name)
+            """ Allow both {% load library_name %} and {% load app_label.library_name %} """
+            app, library = library_name.split('.')
+        except ValueError:
+            app, library = ('', library_name)
+
+        templatetags_modules = get_app_label_and_modules()
+        tried_modules = []
+        for module, app_label in templatetags_modules: 
+            """ If using app_label.library check that app_label is the same as app. """
+            if not app or app == app_label:
+                module_name = '%s.%s' % (module, library)
+                tried_modules.append(module_name)
+                lib = import_library(module_name)
+                if lib:
+                    libraries[library_name] = lib
+                    break
+        if not lib:
+            raise InvalidTemplateLibrary("Template library %s not found, tried %s" % (library_name, str(tried_modules))) 
     return lib
 
 def add_to_builtins(module_name):
-    builtins.append(get_library(module_name))
+    builtins.append(import_library(module_name))
 
 add_to_builtins('django.template.defaulttags')
 add_to_builtins('django.template.defaultfilters')
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index e5a8e66..cd671b9 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -850,7 +850,7 @@ def load(parser, token):
     for taglib in bits[1:]:
         # add the library to the parser
         try:
-            lib = get_library("django.templatetags.%s" % taglib)
+            lib = get_library(taglib)
             parser.add_library(lib)
         except InvalidTemplateLibrary, e:
             raise TemplateSyntaxError("'%s' is not a valid tag library: %s" %
diff --git a/django/templatetags/__init__.py b/django/templatetags/__init__.py
index 9204535..28aa112 100644
--- a/django/templatetags/__init__.py
+++ b/django/templatetags/__init__.py
@@ -1,7 +1,17 @@
 from django.conf import settings
+import os
 
-for a in settings.INSTALLED_APPS:
-    try:
-        __path__.extend(__import__(a + '.templatetags', {}, {}, ['']).__path__)
-    except ImportError:
-        pass
+app_labels_and_modules= [] 
+
+def get_app_label_and_modules():
+    if not app_labels_and_modules:
+        """ Populate list once per thread. """
+        for a in ['django'] + list(settings.INSTALLED_APPS):
+            try:
+                module, app_label = (a, a.split('.')[-1])
+                name = module + '.templatetags'
+                mod = __import__(name, {}, {}, [''])
+                app_labels_and_modules.append((name, app_label))
+            except ImportError:
+                pass
+    return app_labels_and_modules 
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index aef6f50..0490f2a 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -45,7 +45,7 @@ def do_echo(parser, token):
 
 register.tag("echo", do_echo)
 
-template.libraries['django.templatetags.testtags'] = register
+template.libraries['testtags'] = register
 
 #####################################
 # Helper objects for template tests #
