diff --git a/harvest/oai.ini b/harvest/oai.ini
index 67de45b3729a6ee02d0a157df0cea503267a6e2b..e71fcb56f9018691f6cb8de5bab40dc4ec1317f0 100644
--- a/harvest/oai.ini
+++ b/harvest/oai.ini
@@ -12,6 +12,7 @@
 ; injectId = false
 ; injectSetName = false
 ; injectSetSpec = false
+; injectHeaderElements[] = hierarchy
 ; dateGranularity = auto
 ; harvestedIdLog = harvest.log
 ; verbose = false
@@ -57,6 +58,10 @@
 ; omitted or set to false, no setSpec-related changes will be made to the harvested
 ; metadata.
 ;
+; injectHeaderElements may be set to an array of elements within the header of the
+; OAI-PMH response which should be copied into the saved XML document.  This is
+; rarely necessary.
+;
 ; dateGranularity is the granularity used by the server for representing dates.
 ; This may be "YYYY-MM-DDThh:mm:ssZ," "YYYY-MM-DD" or "auto" (to query the server
 ; for details).  The default is "auto."
diff --git a/module/VuFind/src/VuFind/Harvester/OAI.php b/module/VuFind/src/VuFind/Harvester/OAI.php
index 63642654106ea0f938addb0c9f4e0edc17ce2e7d..86363f87ace54dfd4a649347e78060209c178b4b 100644
--- a/module/VuFind/src/VuFind/Harvester/OAI.php
+++ b/module/VuFind/src/VuFind/Harvester/OAI.php
@@ -138,6 +138,13 @@ class OAI
      */
     protected $injectDate = false;
 
+    /**
+     * List of header elements to copy into body
+     *
+     * @var array
+     */
+    protected $injectHeaderElements = array();
+
     /**
      * Associative array of setSpec => setName
      *
@@ -221,6 +228,12 @@ class OAI
         if (isset($settings['injectDate'])) {
             $this->injectDate = $settings['injectDate'];
         }
+        if (isset($settings['injectHeaderElements'])) {
+            $this->injectHeaderElements
+                = is_array($settings['injectHeaderElements'])
+                    ? $settings['injectHeaderElements']
+                    : array($settings['injectHeaderElements']);
+        }
         if (isset($settings['dateGranularity'])) {
             $this->granularity = $settings['dateGranularity'];
         }
@@ -503,6 +516,13 @@ class OAI
                 }
             }
         }
+        if (!empty($this->injectHeaderElements)) {
+            foreach ($this->injectHeaderElements as $element) {
+                if (isset($record->header->$element)) {
+                    $insert .= $record->header->$element->asXML();
+                }
+            }
+        }
         if (!empty($insert)) {
             $xml = preg_replace('/>/', '>' . $insert, $xml, 1);
         }