1 Kings 2:42-44 NIV

42 the king summoned Shimei and said to him, "Did I not make you swear by the LORD and warn1 you, 'On the day you leave to go anywhere else, you can be sure you will die'? At that time you said to me, 'What you say is good. I will obey.'

References for 1 Kings 2:42

43 Why then did you not keep your oath to the LORD and obey the command I gave you?"
44 The king also said to Shimei, "You know in your heart all the wrong2 you did to my father David. Now the LORD will repay you for your wrongdoing.

References for 1 Kings 2:44