Another interpretation. Rabbi Judah the Levite son of Rabbi Shallum said: When she was going out, the Holy One, blessed be He, lit up her eyes, and she found them after she had lost them; for there is no "finding" except out of the category of what was lost, as it is written, "Or has found what was lost" (Leviticus 5:22). Immediately she sent to Judah, "to the man to whom these belong" (Genesis 38:25). She said to him, "Judah, recognize, I pray, your Creator." Immediately, "And Judah recognized" (Genesis 38:26). At that hour a heavenly voice (bat kol) went forth and said to him: Say, "She is pregnant by me," so that she not be burned. And afterward he acknowledged: "From me was the matter." The Holy One, blessed be He, said to him: Judah, you have saved three souls for Me from the fire, and one from the pit. By your life, I too will save for you just as you have saved for Me. Who are they? Hananiah, Mishael, and Azariah from the fiery furnace, and Daniel from the lions' pit. What is written concerning them? "And among them, from the children of Judah, were Daniel, Hananiah, Mishael, and Azariah" (Daniel 1:6). "From the children of Hezekiah" is not written here, but "from the children of Judah." On account of what? On account of his having saved Tamar and her children, and Joseph from the pit. When Reuben heard that Judah had acknowledged, immediately he too arose and said: I also have profaned my father's couch. Eliphaz said to Job, "I will show you, hearken to me; and this I have seen, and I will declare it, that which wise men have told" (Job 15:17-18)—these are Reuben and Judah. Therefore, "to them alone was the land given" (Job 15:19). When? "And no stranger passed among them" (ibid.)—when Moses came to bless them, what did he say? "Let Reuben live and not die," and "And this is for Judah" (Deuteronomy 33:6-7).
Judah Acknowledges Tamar and Saves Four Lives from Fire
Midrash Tanchuma Buber, Vayeshev 17:7
ד"א אמר ר' יהודה הלוי ב"ר שלום עם שהיא יוצאה האיר הקב"ה עיניה ומצאה אותם מאחר שאבדתן, שאין מציאה אלא מכלל אבדה, שכתיב או מצא אבדה (ויקרא ה כב), מיד שלחה אצל יהודה, לאיש אשר אלה לו, אמרה לו יהודה הכר נא את בוראך, מיד ויכר יהודה, באותה שעה יצתה בת קול ואמרה לו תאמר [ממני הרה שלא] תשרף, ואחר כן הודה ממני היה הדבר, א"ל הקב"ה יהודה אתה הצלת לי שלש נפשות מן האור, ואחד מן הבור, חייך אף אני אציל לך כשם שהצלת לי מי הם חנניה מישאל ועזריה מכבשן האש, ודניאל מבור אריות, מה כתיב בהם ויהי בהם מבני יהודה דניאל חנניה מישאל ועזריה (דניאל א ו), מבני חזקיה אין כתיב כאן, אלא מבני יהודה, על ידי מה, על ידי שהציל תמר ובניה ויוסף מן הבור, כיון ששמע ראובן שהודה יהודה, מיד עמד גם הוא ואמר אף אני חללתי יצועי אבי, אמר אליפז לאיוב אחוך שמע לי וזה חזיתי ואספרה אשר חכמים יגידו (איוב טו יז יח), אלו ראובן ויהודה, לפיכך להם לבדם נתנה הארץ (שם שם יט), אימתי ולא עבר זר בתוכם (שם), כשבא משה לברכן, מה אמר, יחי ראובן ואל ימות וגו', וזאת ליהודה (דברים לג ו ז).