Exodus 13:17-18

Exodus 13:17-18 AMP

So it happened, when Pharaoh let the people go, God did not lead them by way of the land of the Philistines, even though it was nearer; for God said, “The people might change their minds when they see war [that is, that there will be war], and return to Egypt.” But God led the people around by the way of the wilderness toward the Red Sea; the sons of Israel went up in battle array (orderly ranks, marching formation) out of the land of Egypt.

Read Exodus 13