Gen 17:16, Mt 2:13-16

Christ comes as the descendant of Abraham and Sarah. So when King Pharaoh tried to take Sarah as her wife, God brought disaster upon the king to protect the way of Christ. (Gen. 17:16, Gen. 12:17-20)

Gen. 17:16 And I will bless her, and give thee a son also of her: yea, I will bless her, and she shall be a mother of nations; kings of people shall be of her.

Gen. 12:17 And the Lord plagued Pharaoh and his house with great plagues because of Sarai Abram's wife. 18 And Pharaoh called Abram and said, What is this that thou hast done unto me? why didst thou not tell me that she was thy wife? 19 Why saidst thou, She is my sister? so I might have taken her to me to wife: now therefore behold thy wife, take her, and go thy way. 20 And Pharaoh commanded his men concerning him: and they sent him away, and his wife, and all that he had.

King Herod killed all the children of Israel to kill the little Christ. But God protected Christ by allowing Joseph to flee to Egypt. (Mt 2:13-16)

Mt 2:13 And when they were departed, behold, the angel of the Lord appeareth to Joseph in a dream, saying, Arise, and take the young child and his mother, and flee into Egypt, and be thou there until I bring thee word: for Herod will seek the young child to destroy him. 14 When he arose, he took the young child and his mother by night, and departed into Egypt: 15 And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son. 16 Then Herod, when he saw that he was mocked of the wise men, was exceeding wroth, and sent forth, and slew all the children that were in Bethlehem, and in all the coasts thereof, from two years old and under, according to the time which he had diligently inquired of the wise men.