Matthew 2:13-23 and Waldenström's Commentary
Verse 13 — When they had left, there appeared one of the Lord's angels to Joseph in a dream saying: Stand up and take the child and its mother with you and flee to Egypt and remain there until I tell you,for Herod is coming to search for the child in order to kill it.
God looks after his own anticipating the enemy's attacks.
Verse 14 — He stood up and took the child and its mother in the night and travelled to Egypt
Immediate obedience is always safe.
Verse 15 — and remained there until Herod's death, so that it should be fulfilled which had been spoken by the Lord through the prophets who said: From Egypt I have called my son. (Exodus 4:22, Hosea 11:1)
The words in Hosea allude first to the people of Israel and then also to Christ; and God led the events (the people unaware) in a way that the prophesy should be fulfilled.
Verse 16 — Then Herod became very angry, when he saw that he had been deceived by the Magi, and he ordered all the male children in Bethlehem and the surrounding area to be killed who were two years old1 and younger, according to the time that he had been told by the Magi.2
Verses 17, 18 — Then that which had been spoken through the prophet Jeremiah was fulfilled: A voice was heard in Rama, much crying and lamenting, Rachel weeping for her children; and she did not want to be comforted for they were no more.
The words in Jeremiah 31:15 allude to the Jews being taken away to Babylon. Rama was a city in the tribe of Benjamin, two hours, north of Jerusalem. There the Jews were kept after the destruction of Jerusalem to be taken to Babylon as prisoners (Jer. 40:1). Rachel was Benjamin's mother and is portrayed by the prophet as disconsolate, crying over her children's removal into captivity. The evangelist applies the words as a prophesy of the child killings in Bethlehem.
Verse 19 — But when Herod had died, there appeared in a dream to Joseph in Egypt one of the Lord's angels
Herod died in Jericho of the most terrible illness. The pain in conjunction with a bad conscience brought him to the edge of despair where he tried to commit suicide and did not succeed.
Verses 20-22 — saying: Stand up and take the child and its mother with you and travel into the land of Israel because those who sought after he child's soul are dead. He stood up and took the child and its mother with him and came into the land of Israel But when he heard that Archelaus was ruler over Judea in his father Herod's place, he was afraid to travel there. But since he had received his answer in a dream from God, he travelled to Galilee.
After Herod's death, Caesar Augustus divided the kingdom among his three sons in such a way that Archelaus obtained approximately half — Judea, Idumeen, and Samaria.
Verse 23 — He came to a city that was called Nazareth1 and he settled there that it might be fulfilled which was said through the prophets: He shall be called a Nazarene.2