As Abraham was about to sacrifice his son on the altar, an angel appeared and told him to not sacrifice his son. He then explained that it was the test of faith and he succeeded in it as he believed in the command of God.