And so too with the measure of good: when a person performs a commandment, good is allotted to him for up to four generations. And know that this is so, as it is said, "And the LORD said to Jehu, Because you have done well in performing what is right in My eyes... your sons of the fourth generation shall sit on the throne of Israel" (II Kings 10:30). They said of Jehu son of Nimshi that he was God-fearing and did not go after the golden calves that Jeroboam son of Nebat made; but afterward, once he came to greatness and kingship, he corrupted his deeds. And when Jehoahaz his son came and followed after him, had he repented he would have been called righteous and it would have gone well with him; but since he did not repent, he was called wicked and it went well with him. And in a similar matter you say: they said of Jeroboam son of Joash that he was a man who showed honor to the prophets; therefore those nations which the Holy One, blessed be He, did not deliver into the hand of Joshua son of Nun, nor into the hand of David king of Israel, the Holy One, blessed be He, delivered into the hand of Jeroboam son of Joash, as it is said, "He restored the border of Israel... according to the word of the LORD... which He spoke by the hand of His servant Jonah son of Amittai... for the LORD saw the affliction of Israel, that it was very bitter, and there was none shut up nor left, and no helper for Israel; and He saved them by the hand of Jeroboam son of Joash" (II Kings 14:25-27). And what indeed was the merit of Jeroboam son of Joash, that he restored the border of Israel, seeing that he worshiped idolatry? Only because he did not accept slander against Amos, as it is said, "And Amaziah the priest of Bethel sent to Jeroboam king of Israel, saying, Amos has conspired against you in the midst of the house of Israel; the land is not able to bear all his words. For thus Amos says, Jeroboam shall die by the sword" (Amos 7:10-11). Immediately Jeroboam rebuked Amaziah and dismissed him with reproof, and said to him, "Heaven forbid, that righteous one did not prophesy this of his own accord; and if he prophesied this, he did not prophesy it of his own mind, but it was said to him from Heaven that he should prophesy thus." At that hour the Holy One, blessed be He, said, "Even though that generation worshiped idolatry, and even the head of the generation worshiped idolatry, even so, the land which I promised to Abraham, to Isaac, and to Jacob to give to their seed, I will give it into the hand of this one"; therefore it is said, "He restored the border of Israel." From here they said: merit is brought about through one who is meritorious, and guilt through one who is guilty. And in this measure He conducts Himself with all Israel in all their dwelling places, and with all the nations and all the families of the earth.
Good Deeds Rewarded for Four Generations and Jehu's Line
Tanna debei Eliyahu Zuta 7:1
וכן במדת הטוב כשאדם עושה מצוה קנסו עליו טובה עד ארבעה דורות ותדע לך שכן הוא שנאמר (מלכים ב י׳:ל׳) ויאמר ה' אל יהוא יען אשר הטיבות לעשות הישר בעיני וגו' בני רבעים ישבו לך על כסא ישראל. אמרו עליו על יהוא בן נמשי שהוא היה ירא שמים ולא הלך אחר עגלי זהב שעשה ירבעם בן נבט אלא אח"כ כיון שבא לידי גדולה ומלכות אז קלקל מעשיו וכשבא יהואחז בנו והלך אחריו אם היה עושה תשובה אז נקרא צדיק וטוב לו אבל כיון שלא עשה תשובה אז נקרא רשע וטוב לו. וכיוצא בדבר אתה אומר אמרו עליו על ירבעם בן יואש שהוא היה בן אדם שהיה נוהג כבוד בנביאים לכן אותן העמים מה שלא מסר הקב"ה ביד יהושע בן נון ולא ביד דוד מלך ישראל מסר הקב"ה ביד ירבעם בן יואש שנאמר (שם יד) הוא השיב את גבול ישראל וגו' כדבר ה' וגו' אשר דבר ביד עבדו יונה בן אמתי וגו' כי ראה ה' את עני ישראל מורה (מיצר) מאד ואפס עצור ואפס עזוב וגו' ויושיעם ביד ירבעם בן יואש וכי מה טיבו של ירבעם בן יואש שהוא השיב את גבול ישראל והלא היה עובד ע"א אלא משום שלא קבל לה"ר על עמוס שנאמר (עמוס ז׳:י׳) וישלח אמציה כהן בית אל אל ירבעם מלך ישראל לאמר קשר עליך עמוס בקרב בית ישראל לא תוכל הארץ להכיל את כל דבריו כי כה אמר עמוס בחרב ימות ירבעם וגו' מיד גער בו ירבעם באמציה והוציאו בנזיפה ואמר לו ח"ו לא נתנבא אותו הצדיק כך ואם נתנבא כך לא מדעתו הוא מתנבא כך אלא מן השמים נאמר לו שיתנבא כך. באותה שעה אמר הקב"ה אף על פי שהדור ההוא עבדו ע"א וגם ראש הדור עובד ע"א אפילו הכי הארץ אשר אמרתי לאברהם וליצחק וליעקב לתת לזרעם אתננה בידו של זה לכך נאמר הוא השיב את גבול ישראל וגו' מכאן אמרו מגלגלין זכות ע"י זכאי וחובה ע"י חייב וכן במדה הזאת הוא נוהג בכל ישראל בכל מקומות מושבותם ובכל העכו"ם וכל משפחות האדמה