The Egyptians pursued the Israelites. Pharaoh’s army, including all his horse-drawn chariots and cavalry, caught up with them as they were setting up their camp by the sea at Pi Hahiroth facing north.
So God led the people around the other way, on the road through the desert toward the Red Sea. The Israelites were ready for battle when they left Egypt.