1 Kings 2:20
Then she said, I desire one small petition of thee; I pray thee, say me not nay. And the king said unto her, Ask on, my mother: for I will not say thee nay. Then she said, I desire one small petition of thee; I pray thee, say me not nay. And the king said unto her, Ask on, my mother: for I will not say thee nay.
The verse belongs to the life and reign of Solomon recorded in the first eleven chapters of 1 Kings, coming after Saul was succeeded by David and Solomon and before the division of the kingdom under Rehoboam into Israel and Judah. Its immediate setting is shortly after Solomon was crowned king instead of Adonijah, in the period when Solomon was carrying out the charge David had given him. The surrounding events concern Adonijah's failed attempt to take David's throne from unholy ambition that sought to take advantage of David's old age. In that struggle Joab failed in loyalty to his king, while Nathan the prophet opposed Adonijah's plan because he knew the Lord's will and David's mind.
The verse itself is part of Adonijah's request made through Bath-sheba, which was a shrewd plot to gain the kingdom, since possessing the king's concubine could give him a strong claim among the fickle people. The episode ended in Adonijah's overthrow and death, and a little later Joab was slain and Shimei, who had cursed David, was also put to death for failing to abide by the conditions of life laid upon him. Adonijah's rebellion and death as recorded in this passage show that the sword would not depart from David's house, as retribution upon David for his wicked conduct toward Uriah.
That retribution followed David through all the rest of his life and came principally in his own family, including the sad history of Amnon and Tamar and the rebellion and unnatural crimes of Absalom. The verse thus illustrates that wrongdoing brings calamity and sorrow back upon the wrongdoer in the very kind of evil he caused others, and that sin pays in its own kind.