diff --git a/admin_menu.inc b/admin_menu.inc
index 5640810..d17e8d4 100644
--- a/admin_menu.inc
+++ b/admin_menu.inc
@@ -372,7 +372,7 @@ function admin_menu_expand_args($arguments) {
  */
 function admin_menu_links_menu($tree) {
   $links = array();
-  foreach ($tree as $key => $data) {
+  foreach ($tree as $data) {
     // Skip invisible items.
     if (!$data['link']['access'] || $data['link']['type'] == MENU_CALLBACK) {
       continue;
@@ -390,14 +390,14 @@ function admin_menu_links_menu($tree) {
     // Remove description to prevent mouseover tooltip clashes.
     unset($data['link']['localized_options']['attributes']['title']);
 
-    $links[$key] = array(
+    $links[$data['link']['href']] = array(
       '#title' => $data['link']['title'],
       '#href' => $data['link']['href'],
       '#options' => $data['link']['localized_options'],
       '#weight' => $data['link']['weight'],
     );
     if ($data['below']) {
-      $links[$key] += admin_menu_links_menu($data['below']);
+      $links[$data['link']['href']] += admin_menu_links_menu($data['below']);
     }
   }
   return $links;
diff --git a/admin_menu.module b/admin_menu.module
index 9a82738..fa370bf 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -449,7 +449,7 @@ function admin_menu_output() {
  * Implements hook_admin_menu_output_build().
  */
 function admin_menu_admin_menu_output_build(&$content) {
-  // Add "Add content" link tree on the top level.
+  // Retrieve the "Add content" link tree.
   $link = db_query("SELECT * FROM {menu_links} WHERE router_path = 'node/add' AND module = 'system'")->fetchAssoc();
   $conditions = array();
   for ($i = 1; $i < MENU_MAX_DEPTH; $i++) {
@@ -463,9 +463,17 @@ function admin_menu_admin_menu_output_build(&$content) {
   ));
   $links = admin_menu_links_menu($tree);
   if (!empty($links)) {
-    $key = key($links);
-    $links[$key]['#weight'] = -100;
-    $content['menu'] += $links;
+    // If the user has access to the top-level "Content" category, insert the
+    // "Add content" link tree there.
+    if (isset($content['menu']['admin/content'])) {
+      $content['menu']['admin/content'] += $links;
+    }
+    // Otherwise make insert "Add content" as top-level category.
+    else {
+      $key = key($links);
+      $links[$key]['#weight'] = -100;
+      $content['menu'] += $links;
+    }
   }
 }
 
diff --git a/tests/admin_menu.test b/tests/admin_menu.test
index 60c721b..404a506 100644
--- a/tests/admin_menu.test
+++ b/tests/admin_menu.test
@@ -70,6 +70,25 @@ class AdminMenuWebTestCase extends DrupalWebTestCase {
     $elements = $this->xpath($xpath, $arguments);
     return $this->assertTrue(empty($elements), $message, $group);
   }
+
+  /**
+   * Asserts that links appear in the menu in a specified trail.
+   *
+   * @param array $trail
+   *   A list of menu link titles to assert in the menu.
+   */
+  protected function assertLinkTrailByTitle(array $trail) {
+    $xpath = array();
+    $args = array();
+    $message = '';
+    foreach ($trail as $i => $title) {
+      $xpath[] = '/li/a[text()=:title' . $i . ']';
+      $args[':title' . $i] = $title;
+      $message .= ($i ? ' » ' : '') . check_plain($title);
+    }
+    $xpath = '//div[@id="admin-menu"]/div/ul' . implode('/parent::li/ul', $xpath);
+    $this->assertElementByXPath($xpath, $args, $message . ' link found.');
+  }
 }
 
 /**
@@ -163,7 +182,7 @@ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase {
 
     // Verify that dynamic links are displayed.
     $this->drupalGet('');
-    $this->assertElementByXPath('//div[@id="admin-menu"]', array(), t('Administration menu is displayed.'));
+    $this->assertElementByXPath('//div[@id="admin-menu"]', array(), t('Administration menu found.'));
     $this->assertElementByXPath('//div[@id="admin-menu"]//a[contains(@href, :path)]', array(':path' => 'admin/structure/types'), "Structure » Content types link found.");
 
     // Verify link title output escaping.
@@ -194,5 +213,44 @@ class AdminMenuDynamicLinksTestCase extends AdminMenuWebTestCase {
       ), "Add content » $title link found.");
     }
   }
+
+  /**
+   * Tests Add content links.
+   */
+  function testNodeAdd() {
+    $type = $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+
+    // Verify that "Add content" does not appear for unprivileged users.
+    $permissions = $this->basePermissions + array(
+      'access content',
+    );
+    $this->web_user = $this->drupalCreateUser($permissions);
+    $this->drupalLogin($this->web_user);
+    $this->assertNoText(t('Add content'));
+
+    // Verify "Add content" appears below "Content" for administrative users.
+    $permissions = $this->basePermissions + array(
+      'access content overview',
+      'access content',
+      'create article content',
+    );
+    $this->admin_user = $this->drupalCreateUser($permissions);
+    $this->drupalLogin($this->admin_user);
+    $this->assertLinkTrailByTitle(array(
+      t('Content'),
+      t('Add content'),
+    ));
+
+    // Verify "Add content" appears on the top-level for regular users.
+    $permissions = $this->basePermissions + array(
+      'access content',
+      'create article content',
+    );
+    $this->web_user = $this->drupalCreateUser($permissions);
+    $this->drupalLogin($this->web_user);
+    $this->assertLinkTrailByTitle(array(
+      t('Add content'),
+    ));
+  }
 }
 
