As
David fled Jerusalem, Shimei followed along cursing him, throwing stones, and accusing him concerning
Saul's house. David refused Abishai's request to kill him and left the matter with God. After Absalom's defeat, Shimei hurried to meet David and begged forgiveness; David swore he would not kill him that day. Near his death David instructed
Solomon concerning Shimei. Solomon confined him to Jerusalem under oath, but after Shimei later left the city to recover runaway servants, Solomon judged that he had broken the agreement and ordered his execution.