The crowning of a new king following the removal of the previous queen is not merely a political revolution. It serves as a defining moment of national and spiritual renewal. The central goal of this transition is to return the Davidic dynasty to its original purpose and completely uproot idol worship from the land [ביאור שטיינזלץ, רד״ק]. To achieve this, two separate but deeply connected agreements are established.
The first is a spiritual pact made between God, the king, and the people. The primary approach among commentators is that this represents an acceptance of God's rule, a commitment to serve Him, and a complete rejection of false gods, essentially renewing the original covenant made at Mount Sinai. Because the new king is only a young child, the people take on a unique responsibility. They commit to acting as guardians to ensure that the young monarch upholds the laws of this spiritual agreement [חומת אנך]. However, the requirement to be devoted to God is directed first and foremost at the king himself, warning him to remain faithful [מצודת דוד]. He is placed at the forefront of this agreement because he is the central figure who sets the spiritual direction that the entire nation will follow [אלשיך].
Following the spiritual commitment, a second, political and social agreement is made directly between the king and the people. This pact outlines the laws of the monarchy and establishes a system of mutual responsibility between the ruler and the citizens [חומת אנך]. On one side, the people promise to remain loyal to the king, protect him, and serve him according to the laws of the kingdom [רש״י, אברבנאל]. In return, the king commits to fighting the nation's battles, treating his subjects with compassion, and risking his own life to defend them [מצודת דוד, אברבנאל].
These two agreements are completely intertwined, with the political pact relying entirely on the spiritual one. The people's loyalty to their ruler is strictly conditional upon the king remaining faithful to God. If the king ever abandons God's path, the political agreement between him and the nation is immediately broken [מלבי״ם]. A noticeable difference also exists in how these two commitments are put into practice. The people's spiritual awakening—their desire to return to God and destroy idol worship—happens naturally and with great enthusiasm. In contrast, establishing the king's political authority requires active effort and the deliberate mobilization of military leaders and the public by Jehoiada [אלשיך].