36Now the king sent and called for Shimei and said to him, “Build for yourself a house in Jerusalem and live there, and do not go out from there to any place. 37“For on the day you go out and cross over the brook Kidron, you will know for certain that you shall surely die; your blood shall be on your own head.”38Shimei then said to the king, “The word is good. As my lord the king has said, so your servant will do.” So Shimei lived in Jerusalem many days.
39But it came about at the end of three years, that two of the servants of Shimei ran away to Achish son of Maacah, king of Gath. And they told Shimei, saying, “Behold, your servants are in Gath.” 40Then Shimei arose and saddled his donkey, and went to Gath to Achish to look for his servants. And Shimei went and brought his servants from Gath. 41It was told Solomon that Shimei had gone from Jerusalem to Gath, and had returned. 42So the king sent and called for Shimei and said to him, “Did I not make you swear by YHVH and solemnly warn you, saying, ‘You will know for certain that on the day you depart and go anywhere, you shall surely die’? And you said to me, ‘The word which I have heard is good.’ 43“Why then have you not kept the oath of YHVH, and the command which I have laid on you?” 44The king also said to Shimei, “You know all the evil which you acknowledge in your heart, which you did to my father David; therefore YHVH shall return your evil on your own head. 45“But King Solomon shall be blessed, and the throne of David shall be established before YHVH forever.” 46So the king commanded Benaiah the son of Jehoiada, and he went out and fell upon him so that he died.
Thus the kingdom was established in the hands of Solomon.