When Herod found out that he had been tricked , he ordered all male children in Bethlehem who were 2 or younger to be killed . When Herod realized that he had been tricked , he ordered the execution of all male children in Bethlehem age 2 and younger , based on the information the magi had given him concerning the time the star first appeared .