Matthew 2
About two years later, wise men from the East, having seen His star, came to Judah inquiring where was the child, the King of the Jews. Hearing these things, Herod, the usurper king, was troubled and all Jerusalem with him. Gathering the leaders of Israel together, he demanded of them where Jesus was born. They answered that it was Bethlehem (Mic. 5:22But thou, Bethlehem Ephratah, though thou be little among the thousands of Judah, yet out of thee shall he come forth unto me that is to be ruler in Israel; whose goings forth have been from of old, from everlasting. (Micah 5:2)). Calling the wise men secretly, Herod inquired of them when the star first appeared and sent them to Bethlehem to find the child and bring word again to him as to where He was. Herod's intent was to kill Him.
Having departed from Herod, the star reappeared and led them until it stood over the place where the young child was. Then they rejoiced with exceeding joy. Seeing the child with His mother, they fell down and worshipped Him, presenting to Him gifts of gold, frankincense and myrrh. Outside of His immediate family, the first ones to worship and present gifts to Jesus were Gentiles, not Israelites.
Being warned of God in a dream, the wise men returned to their home by another way. An angel of the Lord instructed Joseph to take Jesus and His mother and to flee into Egypt.
Herod, having been mocked of the wise men, by their returning to their country by another way, slew all of the children of Bethlehem two years old and younger. Rachel wept for her children (Jer. 31:1515Thus saith the Lord; A voice was heard in Ramah, lamentation, and bitter weeping; Rahel weeping for her children refused to be comforted for her children, because they were not. (Jeremiah 31:15)). After Herod's death, Joseph was instructed to return to Israel with the Child and His mother. Being afraid of the new king, Archelaus, and being warned of God in a dream, they turned aside to the town of Nazareth in Galilee.