diff --git a/NEWS b/NEWS
index cd5b005dfd91683bbba1b1a682bd947347dbb62e..b51e9653ab7e0d616fc703c957c96f0f3cceaf70 100644
--- a/NEWS
+++ b/NEWS
@@ -205,6 +205,8 @@ documents those changes that are of interest to users and admins.
     Simon Ruderich.
  -- CRAY: Fix support for configuration with SlurmdTimeout=0 (never mark
     node that is DOWN in ALPS as DOWN in SLURM).
+ -- Fixed the setting of SLURM_SUBMIT_DIR for jobs submitted by Moab (BZ#1467).
+    Patch by Don Lipari, LLNL.
 
 * Changes in SLURM 2.3.4
 ========================
diff --git a/src/common/env.c b/src/common/env.c
index 732aef63d11aad9daaf3097d75c51a7e07b5b419..68e15fe06f6f2877b825409ac62c25a7bc5235a6 100644
--- a/src/common/env.c
+++ b/src/common/env.c
@@ -1694,6 +1694,13 @@ char **env_array_from_file(const char *fname)
 		if (_env_array_entry_splitter(ptr, name, sizeof(name),
 					      value, ENV_BUFSIZE) &&
 		    (!_discard_env(name, value))) {
+			/*
+			 * Unset the SLURM_SUBMIT_DIR if it is defined so
+			 * that this new value does not get overwritten
+			 * in the subsequent call to env_array_merge().
+			 */
+			if (strcmp(name, "SLURM_SUBMIT_DIR") == 0)
+				unsetenv(name);
 			env_array_overwrite(&env, name, value);
 		}
 	}