diff --git a/zuul/merger/client.py b/zuul/merger/client.py
index 72fd4c5..8c41563 100644
--- a/zuul/merger/client.py
+++ b/zuul/merger/client.py
@@ -18,6 +18,8 @@
 
 import gear
 
+import zuul.model
+
 
 def getJobData(job):
     if not len(job.data):
@@ -79,23 +81,26 @@
             return True
         return False
 
-    def submitJob(self, name, data, build_set):
+    def submitJob(self, name, data, build_set,
+                  precedence=zuul.model.PRECEDENCE_NORMAL):
         uuid = str(uuid4().hex)
         self.log.debug("Submitting job %s with data %s" % (name, data))
         job = gear.Job(name,
                        json.dumps(data),
                        unique=uuid)
         self.build_sets[uuid] = build_set
-        self.gearman.submitJob(job)
+        self.gearman.submitJob(job, precedence=precedence)
 
-    def mergeChanges(self, items, build_set):
+    def mergeChanges(self, items, build_set,
+                     precedence=zuul.model.PRECEDENCE_NORMAL):
         data = dict(items=items)
-        self.submitJob('merger:merge', data, build_set)
+        self.submitJob('merger:merge', data, build_set, precedence)
 
-    def updateRepo(self, project, url, build_set):
+    def updateRepo(self, project, url, build_set,
+                   precedence=zuul.model.PRECEDENCE_NORMAL):
         data = dict(project=project,
                     url=url)
-        self.submitJob('merger:update', data, build_set)
+        self.submitJob('merger:update', data, build_set, precedence)
 
     def onBuildCompleted(self, job):
         build_set = self.build_sets.get(job.unique)
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index d6c51e2..9effcb8 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -1222,12 +1222,14 @@
             all_items = dependent_items + [item]
             merger_items = map(self._makeMergerItem, all_items)
             self.sched.merger.mergeChanges(merger_items,
-                                           item.current_build_set)
+                                           item.current_build_set,
+                                           self.pipeline.precedence)
         else:
             self.log.debug("Preparing update repo for: %s" % item.change)
             url = self.pipeline.source.getGitUrl(item.change.project)
             self.sched.merger.updateRepo(item.change.project.name,
-                                         url, build_set)
+                                         url, build_set,
+                                         self.pipeline.precedence)
         return False
 
     def _launchJobs(self, item, jobs):
