When Herod realized that the magi had outwitted him, he flew into a rage and sent men to kill every boy in Bethlehem and its whole district who was two years old or younger, going by the time he had established from the magi.
In context
14So he rose, and while it was still night he set out for Egypt with the child and his mother, 15where he stayed until the death of Herod. This fulfilled what the Lord had spoken through the prophet: “Out of Egypt I called my son.” 16When Herod realized that the magi had outwitted him, he flew into a rage and sent men to kill every boy in Bethlehem and its whole district who was two years old or younger, going by the time he had established from the magi. 17Then what was spoken through the prophet Jeremiah was fulfilled: 18“A voice was heard in Ramah, weeping and long lamentation: Rachel weeping for her children, and she refused to be consoled, because they are no more.”