When a king is appointed, he is anointed with oil reserved for this purpose, as I Samuel 10:1 states: 'And Samuel took the cruse of oil and poured it over his head. Then, he kissed him.'
Once a king is anointed, he and his descendents are granted the monarchy until eternity, for the monarchy is passed down by inheritance, as Deuteronomy 17:20 states 'Thus, he the king and his descendents will prolong their reign in the midst of Israel.'
If the king leaves only a young son, the monarchy should be held for him until he matures, as Yehoyada did for Yoash. The order of inheritance of the monarchy is the same as that governing the inheritance of property. An older son is given precedence over a younger one.
Not only the monarchy, but all other positions of authority and appointments in Israel, are transferred to one's children and grandchildren as inheritances forever.
The above applies if the knowledge and the fear of God of the son is equivalent to that of his ancestors. If his fear of God is equivalent to theirs but not his knowledge, he should be granted his father's position and given instruction. However, under no circumstance should a person who lacks the fear of God be appointed to any posi-tion in Israel, even though he possesses much knowledge.
Once David was anointed king, he acquired the crown of kingship. Afterwards, the kingship belonged to him and to his male descendents forever, as II Samuel 7: 16 states: 'Your throne shall be established forever.' Nevertheless, his acquisition of the monarchy was conditional, applying only to the righteous among his descendents, as Psalms 132:12 states: 'If your children will keep My covenant... their children shall also sit on your throne forever.'
Despite this condition, God assured David that the monarchy would never be taken from his descendents forever, as Psalms 89:31-38 states: "lf his children will forsake My Torah and cease walking in My statutes ... I will punish their transgressions with the rod and their sins with plagues. Nevertheless, I will not utterly remove My grace from him.... His throne shall be ... established forever.'