God told Joseph in a dream to go ahead and marry Mary, who was carrying the Messiah, and Joseph obeyed.
Matthew 1:24-25 NKJV
“Then Joseph, being aroused from sleep, did as the angel of the Lord commanded him and took to him his wife, and did not know her till she had brought forth her firstborn Son. And he called His name JESUS.”
Life for Joseph and Mary returned to normal, until some wise men from the East came into Jerusalem.
Matthew 2:1 NKJV
“Now after Jesus was born in Bethlehem of Judea in the days of Herod the king, behold, wise men from the East came to Jerusalem,”
They had seen the star of a king and had come to worship Him.
Matthew 2:2 NKJV
“saying, “Where is He who has been born King of the Jews? For we have seen His star in the East and have come to worship Him.”
They unintentionally stirred up some very powerful enemies of Christ.
Matthew 2:3 NKJV
“When Herod the king heard this, he was troubled, and all Jerusalem with him.”
Herod then tried to use the wise men to locate Christ to kill Him.
“And he sent them to Bethlehem and said, “Go and search carefully for the young Child, and when you have found Him, bring back word to me, that I may come and worship Him also.”
They found Jesus and worshipped Him with many gifts.
They were getting ready to return to tell Herod where Christ was, when God gave them a special dream.
A warning dream.
Matthew 2:12 NKJV
“Then, being divinely warned in a dream that they should not return to Herod they departed for their own country another way.”
This dream exposed Herod’s hypocrisy and hidden murderous agenda, and also enabled the wise men to avoid danger by using a different route.
May you have early warnings by the Spirit of God, to avoid hidden dangers. May you be protected by God, in Jesus’s name.