A monarchy is a form of government in which sovereignty is actually or nominally embodied in 1 or 2 individuals (the monarch). When the monarch has no or few legal restraints in state and political matters, it is called an absolute monarchy and is a form of autocracy. Cases in which the monarch's discretion is formally limited are called constitutional monarchies. In hereditary monarchies, the office is passed through inheritance within a family group, whereas elective monarchies use some system of voting. Each of these has variations: in some elected monarchies only those of certain pedigrees are eligible, whereas many hereditary monarchies impose requirements regarding the religion, age, gender, mental capacity, and other factors. Occasionally this might create a situation of rival claimants whose legitimacy is subject to effective election. Finally, there have been cases where the term of a monarch’s reign is either fixed in years or continues until certain goals are achieved: an invasion being repulsed, for instance. Thus there are widely divergent structures and traditions defining monarchy.