Herod was furious when he learned that the wise men had outwitted him. He sent soldiers to kill all the boys in and around Bethlehem who were two years old and under, because the wise men had told him the star first appeared to them about two years earlier.
References for Matthew 2:16
Herod's brutal action fulfilled the prophecy of Jeremiah:
"A cry of anguish is heard in Ramah -- weeping and mourning unrestrained. Rachel weeps for her children, refusing to be comforted -- for they are dead."
References for Matthew 2:18