Matthew 2:20

Saying, Arise, and take the young child and his mother, and go into the land of Israel: for they are dead which sought the young child’s life.

Matthew 2:20 belongs to the flight into Egypt, when Herod waited anxiously for the wise men to return so he could carry out his determined purpose to destroy the infant King of Israel. After waiting long he feared his plan would be thwarted and concluded the wise men had discerned his dark, premeditated intent and deliberately avoided him, which he took as insult and mockery, while his impatience, envy, and hatred increased. Stirred by the devil his father, he resolved to accomplish by a most cruel act of power and authority what he had failed to gain by pretense and subtlety, in order to strike terror into all the Jews and show them what would happen to any king they sought to place on the throne in Jerusalem.

After Herod's death, an angel spoke to Joseph in Egypt and told him to arise and take the young child and His mother back to the land of Israel, because Herod and the others who had sought the child's life to kill Him were dead. The message ended the immediate danger from Herod and called the family out of Egypt to return with Jesus and Mary to Israel.

The command to return did not mean every danger had ended, for Joseph learned that Archelaus, Herod's son, was ruling in Judea, and he feared the son would continue his father's murderous purpose and threat against Jesus, so he did not settle in Judea. After further direction from God, the Lord guided Joseph and his family to a place of safety, and he settled them in Nazareth.