Sacred king
In many historical societies, the position of kingship carries a sacral meaning; that is, it is identical with that of a high priest and judge. The concept of theocracy is related, although a sacred king does not need to necessarily rule through his religious authority; rather, the temporal position itself has a religious significance behind it. History 
Sir James George Frazer used the concept of the sacred king in his study The Golden Bough (1890–1915), the title of which refers to the myth of the Rex Nemorensis. Frazer gives numerous examples, cited below, and was an inspiration for the myth and ritual school. However, "the myth and ritual, or myth-ritualist, theory" is disputed; many scholars now believe that myth and ritual share common paradigms, but not that one developed from the other. According to Frazer, the notion has prehistoric roots and occurs worldwide, on Java as in sub-Saharan Africa, with shaman-kings credited with rainmaking and assuring  fertility and good fortune. The king might also be designated to suffer and atone for his people, meaning that the sacral king could be the pre-ordained victim in a human sacrifice, either killed at the end of his term in the position, or sacrificed in a time of crisis (e.g. the Blót of Domalde). The Ashanti flogged a newly selected king (Ashantehene) before enthroning him. So that he might remember what it felt like to suffer as a man, to restrain him in his thereafter acquired god-like power, as the Auriga reminded the conquering hero returning to Rome in his triumph, the crowd's ecstatic adulation rolling in waves across his ego, that he remained but a mortal, and must die. From the Bronze Age in the Near East, the enthronement and anointment of a monarch is a central religious ritual, reflected in the titles "Messiah" or "Christ", which became separated from worldly kingship. Thus Sargon of Akkad described himself as "deputy of Ishtar", just as the modern Catholic Pope takes the role of the "Vicar of Christ". Kings are styled as shepherds from earliest times, e.g., the term applied to Sumerian princes such as Lugalbanda in the 3rd millennium BCE. The image of the shepherd combines the themes of leadership and the responsibility to supply food and protection, as well as superiority. As the mediator between the people and the divine, the sacral king was credited with special wisdom (e.g. Solomon or Gilgamesh) or vision (e.g. via oneiromancy). Study 
Study of the concept was introduced by Sir James George Frazer in his influential book The Golden Bough (1890–1915); sacral kingship plays a role in Romanticism and Esotericism (e.g. Julius Evola) and some currents of Neopaganism (Theodism). The school of Pan-Babylonianism derived much of the religion described in the Hebrew Bible from cults of sacral kingship in ancient Babylonia. The so-called British and Scandinavian cult-historical schools maintained that the king personified a god and stood at the center of the national or tribal religion. The English "myth and ritual school" concentrated on anthropology and folklore, while the Scandinavian "Uppsala school" emphasized Semitological study. Frazer's interpretation 
A sacred king, according to the systematic interpretation of mythology developed by Frazer in The Golden Bough (published 1890), was a king who represented a solar deity in a periodically re-enacted fertility rite. Frazer seized upon the notion of a substitute king and made him the keystone of his theory of a universal, pan-European, and indeed worldwide fertility myth, in which a consort for the Goddess was annually replaced. According to Frazer, the sacred king represented the spirit of vegetation, a divine John Barleycorn. He came into being in the spring, reigned during the summer, and ritually died at harvest time, only to be reborn at the winter solstice to wax and rule again. The spirit of vegetation was therefore a "dying and reviving god". Osiris, Dionysus, Attis and many other familiar figures from Greek mythology and classical antiquity were re-interpreted in this mold. The sacred king, the human embodiment of the dying and reviving vegetation god, was supposed to have originally been an individual chosen to rule for a time, but whose fate was to suffer as a sacrifice, to be offered back to the earth so that a new king could rule for a time in his stead. Especially in Europe during Frazer's early twentieth century heyday, it launched a cottage industry of amateurs looking for "pagan survivals" in such things as traditional fairs, maypoles, and folk arts like morris dancing. It was widely influential in literature, being alluded to by D. H. Lawrence, James Joyce, Ezra Pound, and in T. S. Eliot's The Waste Land, among other works. Robert Graves used Frazer's work in The Greek Myths and made it one of the foundations of his own personal mythology in The White Goddess, and in the fictional Seven Days in New Crete he depicted a future in which the institution of a sacrificial sacred king is revived. Margaret Murray, the principal theorist of witchcraft as a "pagan survival," used Frazer's work to propose the thesis that many kings of England who died as kings, most notably William Rufus, were secret pagans and witches, whose deaths were the re-enactment of the human sacrifice that stood at the centre of Frazer's myth. This idea used by fantasy writer Katherine Kurtz in her novel Lammas Night. Examples 
 Chakravartin, a righteous king derived from Indian religious thought. Devaraja, cult of divine kings in Southeast Asia. Germanic kingship
 Holy Roman Emperor
 Imperial cult
 The Omukama of Kitara ruled as a heavenly sovereign. The High King of Ireland, according to medieval tradition, married the sovereignty goddess. Almamy—derived from al-Imam, meaning "the one leading the prayer" in Arabic—regnal title of theocratic monarchs of Futa Toro, Futa Jallon and West African rulers. The Eze Nri, ruler of the defunct Igbo Nri Kingdom in present-day Nigeria. He was addressed as "Igwe," meaning "heavenly one" in the Igbo language, and has bequeathed his title to the monarch of a contemporary traditional state of the same name. The Emperor of Japan is known in Japanese as Tennō – "heavenly sovereign", and was formerly believed to be a living kami. The Kende was the sacred king of the Magyars in the 9th century. The Khagan (Ashina)
 The Kings of Luba became deities after death. The temporal power of the papacy
 Pharaoh, title of Ancient Egyptian rulers. The pharaoh adopted names symbolizing holy might. The last vestige of Athenian monarchy, Archon basileus, mainly retained the duties of overseeing certain religious rites. King of Rome
 Rex Sacrorum
 Pontifex Maximus – a title inherited by the papacy
 Roman triumph, according to legend first enacted by Romulus
 Augustus
 Son of Heaven, East Asian title
 Shah and Guardianship of the Islamic Jurist, Islamic concepts in Iran
 The kings of Sparta claimed direct descent from Heracles himself, and served as hereditary priests. King of Thailand
 The pre-colonial emperors and kings of the Yoruba people, the Obas, and their contemporary successors
 Madkhalism in Islam
 Kings in pre-Christian Scandinavia and England claimed descent from gods such as Odin (House of Wessex, House of Knýtlinga)  and Freyr (Yngling). Scandinavian kings in pre-Christian times served as priests at sacrifices. Monarchies carried sacral kingship into the Middle Ages, encouraging the idea of kings installed by the Grace of God. See:
 Capetian Miracle
 Royal touch, supernatural powers attributed to the kings of England and France
 The Serbian Nemanjić dynasty
 The Hungarian House of Árpád (known during the Medieval period as the "dynasty of the Holy King"')
 The Prince-Bishops, existing in various European countries in Medieval and later times. In fiction 
Many of Rosemary Sutcliff's novels are recognized as being directly influenced by Frazer, depicting individuals accepting the burden of leadership and the ultimate responsibility of personal sacrifice, including Sword at Sunset, The Mark of the Horse Lord, and Sun Horse, Moon Horse. In addition to its appearance in her novel Lammas Night noted above, Katherine Kurtz also uses the idea of sacred kingship in her novel The Quest for Saint Camber. 