diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js
index e53ac499b619d8a72df204dbcfbd1bf61193beab..a1b248220834cc4e66517e9cf1e53a900e2459d4 100644
--- a/lib/workers/pr/index.js
+++ b/lib/workers/pr/index.js
@@ -30,6 +30,19 @@ async function ensurePr(prConfig) {
     logger.debug(
       `Branch is configured for branch automerge, branchStatus is: ${branchStatus}`
     );
+    if (branchStatus === 'pending' || branchStatus === 'running') {
+      logger.debug('Checking how long this branch has been pending');
+      const lastCommitTime = await platform.getBranchLastCommitTime(branchName);
+      const currentTime = new Date();
+      const millisecondsPerHour = 1000 * 60 * 60;
+      const elapsedHours = Math.round(
+        (currentTime.getTime() - lastCommitTime.getTime()) / millisecondsPerHour
+      );
+      if (elapsedHours >= config.prNotPendingHours) {
+        logger.info('Branch exceeds prNotPending hours - forcing PR creation');
+        config.forcePr = true;
+      }
+    }
     if (config.forcePr || branchStatus === 'failure') {
       logger.debug(`Branch tests failed, so will create PR`);
     } else {
diff --git a/test/workers/pr/index.spec.js b/test/workers/pr/index.spec.js
index 0355c5b85e19545a0b1fe985502bcf75426c88bd..8f6c684d323046c51e74d397992be83479bd0662 100644
--- a/test/workers/pr/index.spec.js
+++ b/test/workers/pr/index.spec.js
@@ -300,9 +300,20 @@ describe('workers/pr', () => {
       config.automerge = true;
       config.automergeType = 'branch-push';
       platform.getBranchStatus.mockReturnValueOnce('pending');
+      platform.getBranchLastCommitTime.mockReturnValueOnce(new Date());
       const pr = await prWorker.ensurePr(config);
       expect(pr).toBe(null);
     });
+    it('should not return null if branch automerging taking too long', async () => {
+      config.automerge = true;
+      config.automergeType = 'branch-push';
+      platform.getBranchStatus.mockReturnValueOnce('pending');
+      platform.getBranchLastCommitTime.mockReturnValueOnce(
+        new Date('2018-01-01')
+      );
+      const pr = await prWorker.ensurePr(config);
+      expect(pr).not.toBe(null);
+    });
     it('handles duplicate upgrades', async () => {
       config.upgrades.push(config.upgrades[0]);
       const pr = await prWorker.ensurePr(config);