“And being warned of God in a dream that they should not return to Herod, they departed into their own country another way.”
King James Version (KJV)
Mt 2:12 Being warned of God in a dream. Probably they were suspicious of Herod, for they could not fail to know his character, and asked God to guide them. He did so by a dream, and hence they avoided Jerusalem on their return.