diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c
index 58072876c4816edc936481aa87b9ef7b16401182..50e46dbde071ebaa545e00972971ae790461cd0a 100644
--- a/src/slurmd/slurmd/req.c
+++ b/src/slurmd/slurmd/req.c
@@ -1172,6 +1172,14 @@ _rpc_launch_tasks(slurm_msg_t *msg)
 	req->envc = envcount(req->env);
 
 #ifndef HAVE_FRONT_END
+	/*
+	 *  Do not launch a new job step while prolog in progress:
+	 */
+	if (_prolog_is_running (req->job_id)) {
+		info("[job %u] prolog in progress\n", req->job_id);
+		errnum = EINPROGRESS;
+		goto done;
+	}
 	slurm_mutex_lock(&prolog_mutex);
 	first_job_run = !slurm_cred_jobid_cached(conf->vctx, req->job_id);
 #endif
@@ -1787,6 +1795,15 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg)
 
 	task_g_slurmd_batch_request(req->job_id, req);	/* determine task affinity */
 
+	/*
+	 *  Do not launch a new batch job while prolog in progress:
+	 */
+	if (_prolog_is_running(req->job_id)) {
+		info("[job %u] prolog running", req->job_id);
+		rc = EINPROGRESS;
+		goto done;
+	}
+
 	slurm_mutex_lock(&prolog_mutex);
 	first_job_run = !slurm_cred_jobid_cached(conf->vctx, req->job_id);