Tavut in the name of Shmuel: they did not permit a beautiful woman (the captive of war) except after fourteen years, seven that they conquered and seven that they apportioned. (And I say: they permitted her only the first act of intercourse, so that she would accept upon herself what is written in the passage, "and she shall remove the garment of her captivity" etc. (Deuteronomy 21:13).) Rabbi Yochanan sent to the Rabbis of that place; he said to them: You say two things in the name of Rav, but you do not say them well. You say in the name of Rav that the beautiful captive woman was permitted only the first act of intercourse alone. (And I say: not the first act and not the last act, but only after all the deeds: "and she shall remove the garment of her captivity" etc., and afterward "you may come to her and possess her.") You say in the name of Rav that the altar that is in Jerusalem grants asylum, and its roof grants asylum. And I say: neither does the altar grant asylum nor does its roof grant asylum, but only the six cities of refuge alone. Know this for yourself: Joab the Tachkemonite, chief of the captains, was mistaken in all this error: "And Joab fled to the Tent of the LORD and took hold of the horns of the altar" (1 Kings 2:28). But did he not flee only to the Sanhedrin? He said: If I am killed, my property shall be given to my sons, as it is taught: those executed by the kingdom—their property goes to the kingdom; those executed by the court—their property goes to the heirs. Solomon sent after him and said to him: Accept upon yourself the measure of judgment. He said to him: Five decrees your father decreed upon me; if you accept those, I too will accept upon myself the measure of judgment. This is what is written: "May they fall upon the head of Joab [and upon all his father's house, and may there never be cut off from the house of Joab one who has a discharge, or a leper, or one who holds a spindle, or one who falls by the sword, or one who lacks bread]" (2 Samuel 3:29). "One who has a discharge"—from Rehoboam: "And King Rehoboam made haste" etc. (1 Kings 12:18). "A leper"—from Uzziah: "And Uzziah the king was a leper" etc. (2 Chronicles 26:21). "One who holds a spindle"—from Joash: "And against Joash they executed judgments" (ibid. 24:24). "One who falls by the sword"—from Josiah: "And the archers shot at King Josiah" (ibid. 35:23). Rabbi Mana said: Three hundred arrows they shot into him until his body became like a sieve. "And one who lacks bread"—from Jehoiachin: "And his allowance was a continual allowance" etc. (2 Kings 25:30). Immediately, "Benaiah son of Jehoiada went up and struck him and killed him, and he was buried in his own house" (1 Kings 2:34), in the wilderness. Rabbi Pinchas and Rabbi Yirmiyah in the name of Rabbi Chiyya bar Abba: And was Joab's house in the wilderness? Rather, since he died, Israel became like a wilderness. If you say that he used to build for them porticos and bathhouses—in which was their sustenance—if you say that he used to plunder and feed the sages and their disciples—the praise of his praises, praises were his.
Joab at the Altar and the Five Curses David Decreed Upon His House
Midrash Shmuel 25:3
טבות בשם שמואל לא התירו אשה יפת תואר אלא לאחר ארבע עשרה, שבע שכיבשו ושבע שחילקו, (ואני אומר לא התירוה אלא ביאה ראשונה בלבד כדי שתקבל עליה מה שכתוב בפרשה והסירה את שמלת שביה וגו' (דברים כ"א י"ג)), רבי יוחנן שלח לרבנין דתמן אמר להון אתון אמרין תרתי מילין בשם רב, ולית אתון אמרין טבאות, אתון אמרין בשם רב [יפת תואר] לא התירוה אלא ביאה ראשונה בלבד [ואני אומר לא ביאה ראשונה ולא ביאה אחרונה אלא לאחר כל המעשים והסירה את שמלת שביה וגו' ואחר כן תבא אליה ובעלתה], אתון אמרין בשם רב מזבח שבירושלם קולט וגגו קולט, ואני אומר לא מזבח קולט ולא גגו קולט, אלא שש ערי מקלט בלבד, תדע לך יואב תחכמוני ראש השלישי היה טועה כל הטעות הזאת, וינס יואב אל אהל ה' ויחזק בקרנות המזבח (מלכים א' ב' כ"ח), והלא לא ברח אלא אצל סנהדרין, אמר אם אהרג ייהבי נכסיי לבני, דתניא הרוגי מלכות נכסיהן מלכות, הרוגי בית דין נכסיהן ליורשין, שלח שלמה אחריו ואמר לו קבל עליך מדת הדין, אמר לו חמש גזירות גזר עלי אביך, אם מקבל את אותן אף אני אקבל עלי מדת הדין, הדא הוא דכתיב יחולו על ראש יואב [ואל כל בית אביו ואל יכרת מבית יואב זב ומצורע ומחזיק בפלך ונופל בחרב וחסר לחם] (שמואל ב' ג' כ"ט), זב מרחבעם, והמלך רחבעם התאמץ וגו' (מלכים א' י"ב י"ח), ומצורע מעוזיהו, ויהי עוזיהו המלך מצורע וגו' (דה"ב כ"ו כ"א), מחזיק בפלך מיואש, ואת יואש עשו שפטים (שם כ"ד כ"ד), נופל בחרב מיאשיהו, ויורו היורים (במלך) [למלך] יאשיהו (שם ל"ה כ"ג), אמר רבי מנא שלש מאות חיצים ירו בו עד שנעשו גופו ככברה, וחסר לחם מיהויכין, וארוחתו ארוחת תמיד וגו' (מלכים ב' כ"ה ל'), מיד ויעל בניהו בן יהוידע ויפגע בו וימיתהו ויקבר בביתו (מלכים א' ב' ל"ד), במדבר, רבי פנחס ורבי ירמיה בשם רבי חייא בר אבא וכי במדבר היה ביתו של יואב, אלא כיון שמת נעשו ישראל כמדבר, (אן) [אין] תימר שהיה בונה להם דימסיות ומרחצאות שבה היה חיותן, (אן) [אין] תימר שהיה בוזז ומאכיל לחכמים ותלמידיהן שבח שבחי שבחין היו לו.