Kingship and deity were closely associated in the ancient world—Egyptian Pharaohs and Assyrian emperors, for example; and at a later date Roman Caesars. In Israel before the monarchy there were no hereditary rulers and when the twelve tribes were settled in Canaan they were ruled by local elders who invited the ‘judges’ to gather an army for action when necessary.
Samuel's anointing of Saul is told (1 Sam. 8) as an act of apostasy in one of the sources of the tradition; Samuel acted reluctantly under popular pressure. There was also the threat from the Philistines (1 Sam. 13: 19–21). On the other hand, a second source (1 Sam. 9: 1–10: 16; 1 Sam. 11) is favourable to the monarchy; Samuel, sought out by Saul to help in the recovery of lost donkeys, anoints Saul, who is then possessed by the ‘Spirit of God’, like the ecstatic prophets. The monarchy in Israel was never totally despotic, and it was subject to restraints and to the judgement of the prophets (as when David, reckoned to be the ideal king, was rebuked by Nathan). Saul did not found a dynasty. When he was regarded as a failure, the prophet anointed David, and his house lasted for 400 years. From 104 to 37 BCE some of the high priests were called king.
Kings of Israel and Judah have some religious leadership, and the coronation ritual in the Temple was important. But there was never a suggestion in these kingdoms that their king was divine, unless a disputed text (Ps. 45: 6) be understood in that sense. God was the great king above all gods (Ps. 95: 3).