In Ancient Egyptian times Pharaohs went to some measures to justify their claims to the throne. During the 18th Dynasty for example, kings legitimized their kingship through the myth of the birth of the divine king. They were fathered by a god, not by a man. Amun was the god to be fathered by. Pointing out the importance of the cult of Amun at Karnak during the 18th Dynasty, with a small downfall during the reign of Akhenaten.
So did Thutmose III (1479-1425 BC) after he completed one of his additions to the Karnak temple in honour of Amun he placed the so called coronation inscription to prove his divinity:
I am his son, beloved of his majesty, whom his double desires to cause that I should present this land at the place, where he is. .. I requited his beauty with something greater than it by magnifying him more than the gods. The recompense of him who does excellent things is a reward for him of things more excellent than they. I have built his house as an eternal work. - my father caused that I should be divine, that I might extend the throne of him who made me; that I might supply with food his altars upon earth; that I might make to flourish for him the sacred slaughtering-block with great slaughters in his temple, consisting of oxen and calves without limit. .. -for this temple of my father Amun, at all feasts; of the sixth day satisfied with that which he desired should be. I know that it is forever; that Thebes is eternal. Amun, Lord of Karnak, Re of Heliopolis of the South, his glorious eye which is in this land. (Ancient Records Of Egypt - J.H. Breasted, Volume II, § 149)
Also Queen Hatshepsut (1473-1458 BC) legitimized her kingship through the myth of divine conception and birth. According to inscriptions, Amun himself chose her to become the ruler of Egypt, even before she was born. One inscription tells the story about how Hatshepsut's mother Queen Ahmose became pregnant of her daughter. The god Amun took form of Hatshepsut's father Thutmose I and found Queen Ahmose asleep in her bedroom. She woke up by the fragrance of the god and recognized him as a god. They had intercourse and Hatshepsut was conceived. The inscription later tells:
Utterance of Amun, Lord of the Two Lands, before her: "Khnemet-Amun-Hatshepsut shall be the name of this my daughter, whom I have placed in thy body, this saying which comes out of thy mouth. She shall exercise the excellent kingship in this whole land. My soul is hers, my bounty is hers, my crown is hers, that she may rule the Two Lands, that she may lead all the living." (Ancient Records Of Egypt - J.H. Breasted, Volume II, § 198)
These are just two examples of two kings from the 18th dynasty, but the divine birth was easily adopted by later Pharaohs. Even in Ptolemaic times, and by Alexander the Great when he visited the Oracle of Amun at Siwa he was proclaimed as son of Amun. Alexander was simply using the old existing tradition. Nothing new there.