Some people were held in bondage in Egypt. It didn't start out that way, but after the leader changed to someone who didn't know those people, he turned them into slaves. Then, someone who was of those people, and had been of the ruling family by chance, came to free his people from slavery.
However, the ruler wasn't going to, "just let them go," he needed some, "persuasion." So ten plagues were sent to the land and finally the ruler let them go, but they were not out of the woods yet. The ruler repented of his choice to let them go and pursued them into the wilderness. The people ended up at what appeared to be a dead end, and the ruler thought he had them trapped. Too bad for the corrupt ruler, that God had a plan. The waters parted and allowed the people to cross, but when the ruler and his minions tried to cross, the waters closed back up, destroying the corrupt ruler and his army.
Sound familiar?