King David’s final instructions to his son Solomon address a delicate political challenge involving a figure who had grievously wronged the outgoing king, yet managed to secure a position of influence in the new administration. Shimei ben Gera presented a complex problem, requiring Solomon to navigate past treason, political loyalty, and the strict boundaries of a royal oath. By the time Solomon took the throne, Shimei had become quite close to him, serving as an advisor and even a Torah teacher [מלבי״ם, מצודת דוד, רד״ק, אברבנאל]. This proximity was partly due to Shimei’s loyalty during Adonijah’s rebellion, where he refrained from joining the uprising against Solomon [רלב״ג, אברבנאל]. However, Shimei's presence under Solomon's direct authority in Jerusalem also offered a practical advantage, making it easier to monitor him and eventually find a legal pretext to punish him [רד״ק, צאינה וראינה]. Some commentators suggest that David, guided by divine inspiration, hinted that Solomon should confine Shimei to Jerusalem, foreseeing that this would ultimately lead to Shimei breaking a restriction and sealing his own fate [נחל שורק, חומת אנך]. Another perspective argues that Solomon was actually unable to execute Shimei within Jerusalem itself, as the city possessed the sanctity of an altar, which precluded the execution of a rebel. Confining him to the city ensured that he would eventually leave its borders and become liable for death [אהבת יהונתן]. A markedly different approach suggests that David never actually intended for Solomon to execute Shimei. Instead, he was merely warning his son not to be deceived by Shimei’s friendly demeanor, advising him to distrust the man and restrict his movements [אברבנאל].
David reminds Solomon of Shimei’s past actions, specifically the severe curses he hurled at the king. These curses were expressions of deep contempt and mockery in both word and deed [מצודת ציון, רד״ק]. They were explicit and clear [רש״י], as well as intensely harsh and cruel [מצודת ציון, רלב״ג, רד״ק, שטיינזלץ]. By acting on his own initiative and fabricating malicious lies, Shimei proved that he was not an emissary sent by God to curse the king [צוארי שלל]. This painful encounter took place during David’s lowest moment, as he was fleeing from the rebellion of his son Absalom [מצודת דוד, אברבנאל]. At the time, David accepted this public humiliation as a necessary part of his own process of repentance, which meant that Shimei remained fully accountable and liable for his treasonous behavior [צוארי שלל].
Later, when David's power was restored, Shimei hurried down to the Jordan River to meet the returning king. The primary approach among commentators is that Shimei rushed to appease David and beg for his forgiveness [מצודת דוד, רד״ק, שטיינזלץ]. However, others view this move as an act of sheer audacity and coercion. In this view, Shimei exploited the shifting political momentum to corner David, effectively forcing the king to forgive him out of political necessity [מלבי״ם, אברבנאל, צוארי שלל]. The detail that this encounter took place at the Jordan River also served to reassure Solomon; it clarified that Shimei’s harsh curses never actually took effect, as such curses only take hold after crossing the river [אהבת יהונתן].
David explains that he did not punish Shimei himself because he had sworn in God's name to spare him, an oath that could not be annulled [אהבת יהונתן], thereby preventing David from taking personal revenge [מצודת דוד]. Furthermore, David had refrained from executing Shimei earlier because he foresaw through divine inspiration that Mordecai the Jew would eventually descend from him. Now that the worthy seed had emerged, Shimei could face justice [צוארי שלל]. Despite the oath that restricted David, Shimei remained a man deserving of death for his treason. Therefore, David entrusted his wise son with the task of finding a new, legally sound pretext to execute Shimei, ensuring justice was served without violating the original royal oath [רד״ק].