Being a king or a queen in ancient times typically meant that the ruler had absolute and total power. Social scientists, such as historians, religious studies experts, and sociologists examined the past to determine how these ancient leaders came to power and what kept them in power for as long as they ruled. One of the most interesting elements that was present in some or all of the ancient cultures was the connection between kingship and religion.
Ancient rulers utilized the faith and beliefs of their people to legitimize their power. The position of "king" (read also: "queen," etc.) often was bolstered by the use of religion to describe sacred or "divine" rulers. A king would proclaim that he had the support of the gods, or that he was a descendent of the gods, or that he, himself, was a god. In this manner, his ruling was supported by more than mere ambition; rather, he had the weight of the culture's belief system to ensure the people agreed with his ruling, according to the gods' will.
Yes, these are Greek Gods, but you get the idea: They had the power, the rulers wanted the power, the rulers claimed to be one of them!
Among the earliest civilizations that demonstrated leadership that had been granted power through divine intervention are Mesopotamia and Egypt.
In the Mesopotamian empire under the Akkadians, the ruling family's dynasty established such control and dominance over a vast territory in Mesopotamia that the king could alter the religion in surrounding city-states, thereby increasing his power and influence from the outside, as a means of persuading his people that others outside of the city of Akkad believed he was god-like in stature.
Other leaders in Mesopotamia later followed suit and claimed to be gods in order to consolidate the empire they came to rule. While this was an effective tactic to gain and retain power, it was not totally effective, as later kings, such as Hammurabi of Babylon struggled to expand their area of influence in the region, regardless of his self-deification (proclaiming oneself to be a god, or related to a god, or bestowed powers by the god(s)).