diff --git a/src/plugins/switch/cray/switch_cray.c b/src/plugins/switch/cray/switch_cray.c
index 6ab942e51bdba98b5437d8a1efe31ca8bf1cce86..12ea081406698d88a96baf3ce52544eaf3db6265 100644
--- a/src/plugins/switch/cray/switch_cray.c
+++ b/src/plugins/switch/cray/switch_cray.c
@@ -712,6 +712,12 @@ int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer,
 		goto unpack_error;
 	}
 	safe_unpack32(&job->port, buffer);
+#ifdef HAVE_NATIVE_CRAY
+	/* If the libstate save/restore failed, at least make sure that we
+	 * do not re-allocate ports assigned to job steps that we recover. */
+	if ((job->port >= MIN_PORT) && (job->port <= MAX_PORT))
+		port_resv[job->port - MIN_PORT] = 1;
+#endif
 
 	if (debug_flags & DEBUG_FLAG_SWITCH) {
 		info("(%s:%d: %s) switch_jobinfo_t contents:",