It is believed in Twelver and Ismaili Shia Islam that 'aql, divine wisdom, was the source of the souls of the prophets and imams and gave them esoteric knowledge called "ḥikmah" and that their sufferings were a means of divine grace to their devotees. Although the imam was not the recipient of a divine revelation, he had a close relationship with God, through which God guides him, and the imam, in turn, guides the people. Imamate, or belief in the divine guide, is a fundamental belief in the Twelver and Ismaili Shia branches and is based on the concept that God would not leave humanity without access to divine guidance.