The Lord told Moses to have Israel camp by the sea, opposite Baal-zephon. God would harden his heart, and he would pursue them, and so the Lord would be glorified through Pharaoh and his army, and Egypt would know that he is the Lord. When Pharaoh and his servants learned that the people had fled, they changed their minds, and he made ready six hundred chosen chariots and all the chariots of Egypt, and overtook Israel by the sea.
Seeing the Egyptians, the Israelites were terrified and cried out to the Lord. They told Moses it would have been better to serve Egypt than to die in the wilderness. Moses answered that they should not fear, but stand firm and see the Lord's salvation, for the Egyptians they saw today they would never see again. The Lord told Moses to lift up his staff and stretch out his hand over the sea to divide it, so that the Israelites could go through on dry ground.
The angel of God and the pillar of cloud moved behind the people, between the camp of Egypt and the camp of Israel: it was cloud and darkness for the Egyptians, and it lit up the night for Israel. Moses stretched out his hand over the sea, and the Lord drove the waters back with a strong east wind all night. The sea became dry land, and the Israelites went through the middle.
The Egyptians followed with horses, chariots and horsemen. In the morning watch the Lord looked down on the Egyptian camp from the pillar of fire and cloud and threw it into confusion; he jammed the wheels of their chariots, and the Egyptians said they must flee from Israel, for the Lord was fighting for them. Moses stretched out his hand again, and at daybreak the waters returned and covered the chariots, the horsemen and all the army; not one remained. Israel saw the Egyptians dead on the shore, and the people feared the Lord and believed in him and in his servant Moses.