1 Kings 1:32

And king David said, Call me Zadok the priest, and Nathan the prophet, and Benaiah the son of Jehoiada. And they came before the king.

David was seventy in his last years, feeble in body from hardships, wars and cares, yet clear in mind though slow to grasp the affairs of the kingdom. Adonijah, handsome but unprincipled and reckless through parental indulgence without restraint, rebelled as a usurper against God's appointment of the better qualified Solomon, ripening a conspiracy with Joab and Abiathar the priest into a feast outside the city to proclaim himself king and seize the kingdom. The faithful Zadok the priest, Nathan the prophet, Bathsheba the mother of Solomon, and Benaiah promptly laid the state of affairs before David and reminded him of the divine direction that Solomon should succeed him.

In response David acted with clear and decisive orders, summoning Zadok the priest, Nathan the prophet, and Benaiah son of Jehoiada to come before him. Standing firm in conviction that Solomon should reign by God's direction, David at once abdicated in favor of Solomon and directed that Solomon be anointed king and publicly recognized and proclaimed as his successor.

This crushed the conspiracy and kept the kingdom from falling to a usurper, preventing war and bloodshed, with Solomon immediately anointed and proclaimed king. The conspiracy's chief actors were brought to death, while Abiathar's life was spared for his office and former fidelity but he was degraded from the high priesthood in favor of Zadok's line, and Joab and Adonijah were spared for a time until they suffered punishment after David's death, the sentence upon David's son completing the fourfold judgment for David's sin.