God took the notion of kingship and placed high expectations on those who ruled. Other nations saw kings as Gods. Biblical kings were to serve God and Gods people, shepherding the people (Ezekiel 34: 1). The command to rule justly runs through the Bible, as does the command not to exploit the people or to worship false Gods. God and the Biblical kings are both described as Shepherds. David, who succeeded Saul, enjoyed an eternal covenant with God, 2 Samuel 7: 16. God promised to regard Davids son as if he were Gods own son. David and Solomon, his son, ruled justly.
David was not allowed to build the Temple due to his act of adultery (2 Samuel II: 4). Solomon, who asked only for wisdom to rule well, not for personal gain, built the temple. His sons, Jeroboam and Rehoboam rebelled, splitting the kingdom. Jeroboam ruled Israel (North), Rehoboam Judea (South). Their descendants were judged good or bad depending on whether they imitated David and ruled justly or worshipped false Gods, exploited the people and shed innocent blood. Too many failed to uphold justice. In 722, Hoshea lost Israel to the Assyrians. In 597, Zedekiah lost Judea and Jerusalem to Babylon.