When Pharaoh let the people go, God did not lead them by way of the land of the Philistines, although that was near. For God said, “Lest the people change their minds when they see war and return to Egypt.” But God led the people around by the way of the wilderness toward the Red Sea. And the people of Israel went up out of the land of Egypt equipped for battle. Moses took the bones of Joseph with him, for Joseph had made the sons of Israel solemnly swear, saying, “God will surely visit you, and you shall carry up my bones with you from here.” And they moved on from Succoth and encamped at Etham, on the edge of the wilderness. And the Lord went before them by day in a pillar of cloud to lead them along the way, and by night in a pillar of fire to give them light, that they might travel by day and by night. The pillar of cloud by day and the pillar of fire by night did not depart from before the people.
Exodus 13:17-22 ESV