This is the story’s second occurrence:
When they (the magi) had gone, an angel of the Lord appeared to Joseph in a dream. “Get up,” he said, “take the child and his mother and escape to Egypt. Stay there until I tell you, for Herod is going to search for the child to kill him.”
So he got up, took the child and his mother during the night and left for Egypt.
When Herod realized that he had been outwitted by the Magi, he was furious, and he gave orders to kill all the boys in Bethlehem and its vicinity who were two years old and under, in accordance with the time he had learned from the Magi.
After Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt and said, “Get up, take the child and his mother and go to the land of Israel, for those who were trying to take the child’s life are dead.”
So he got up, took the child and his mother and went to the land of Israel.
But when he heard that Archelaus was reigning in Judea in place of his father Herod, he was afraid to go there. Having been warned in a dream, he withdrew to the district of Galilee, and he went and lived in a town called Nazareth.
– Matthew 2:13-23
Here is the story’s first occurrence:
Exodus 1:8 Then a new king, to whom Joseph meant nothing, came to power in Egypt. “Look,” he said to his people, “the Israelites have become far too numerous for us. Come, we must deal shrewdly with them or they will become even more numerous and, if war breaks out, will join our enemies, fight against us and leave the country.”
Exodus 1:22 Then Pharaoh gave this order to all his people: “Every Hebrew boy that is born you must throw into the Nile, but let every girl live.”
Exodus 2: Now a man of the tribe of Levi married a Levite woman, and she became pregnant and gave birth to a son. When she saw that he was a fine child, she hid him for three months. But when she could hide him no longer, she got a papyrus basket for him and coated it with tar and pitch. Then she placed the child in it and put it among the reeds along the bank of the Nile. His sister stood at a distance to see what would happen to him.
Then Pharaoh’s daughter went down to the Nile to bathe, and her attendants were walking along the riverbank. She saw the basket among the reeds and sent her female slave to get it. She opened it and saw the baby. He was crying, and she felt sorry for him.
“This is one of the Hebrew babies,” she said.
Then his sister asked Pharaoh’s daughter, “Shall I go and get one of the Hebrew women to nurse the baby for you?”
“Yes, go,” she answered. So the girl went and got the baby’s mother.
Pharaoh’s daughter said to her, “Take this baby and nurse him for me, and I will pay you.” So the woman took the baby and nursed him. When the child grew older, she took him to Pharaoh’s daughter and he became her son.
She named him Moses, saying, “I drew him out of the water.”
One day, after Moses had grown up, he went out to where his own people were and watched them at their hard labor. He saw an Egyptian beating a Hebrew, one of his own people. Looking this way and that and seeing no one, he killed the Egyptian and hid him in the sand. The next day he went out and saw two Hebrews fighting. He asked the one in the wrong, “Why are you hitting your fellow Hebrew?”
The man said, “Who made you ruler and judge over us? Are you thinking of killing me as you killed the Egyptian?”
Then Moses was afraid and thought, “What I did must have become known.”
When Pharaoh heard of this, he tried to kill Moses, but Moses fled from Pharaoh and went to live in Midian,
Many years later…
Exodus 4:19 The Lord said to Moses in Midian, “Go back to Egypt, for all those who wanted to kill you are dead.”
So Moses took his wife and sons, put them on a donkey and started back to Egypt. And he took the staff of God in his hand.
The Lord said to Moses, “When you return to Egypt, see that you perform before Pharaoh all the wonders I have given you the power to do.