Parshat Vayera6 min read

Abraham Opened the Door That Sodom Tried to Shut

Two angels walked slowly from Abraham's feast to Sodom. Lot hid them indoors until a fight over salt drew the whole city to his house.

Curated by Arthur · Told by Maggid ·
Table of Contents
  1. A Visitor on the Third Day
  2. A Little Water and Nine Measures of Flour
  3. Two Angels Who Walked Slowly to Sodom
  4. The Crooked Path and the Quarrel Over Salt
  5. The Night the Angels Stopped Listening
Abraham Opened the Door That Sodom Tried to Shut Click for full size

A Visitor on the Third Day

On the third day after Abraham circumcised himself, the dusty road past his tent in Mamre stood quiet. Before the covenant, passersby had stopped at his doorway day after day, and Abraham worried aloud that the mark in his flesh had driven travelers away. "Before you were circumcised, uncircumcised human beings used to come to you," God told him. "Now I Myself in My glory am revealed to you" (Genesis 18:1).

Because the third day brought the sharpest pain of the wound, God came in person to inquire after the recovering old man. It was like a priest who had a friend working as a shopkeeper. Seeing an impurity inside the shopkeeper's courtyard, the priest told him that if he wanted his friend to step inside, he first had to clear the impurity away. Once the shopkeeper cleared the yard, the priest entered freely. In the same way, once Abraham removed his foreskin for God's name, God stepped straight into his doorway and fulfilled the promise that "from my flesh I shall behold God" (Job 19:26).

A Little Water and Nine Measures of Flour

Before long, three visitors stood near the tent, appearing as ordinary men while the Divine Presence rested upon them. Abraham welcomed them as guests appointed since creation to pass his door, and he asked first for a little water so they could wash the dust of idolatry from their feet before resting under the tree (Genesis 18:4). He promised only a morsel of bread to refresh their heart, speaking of a single heart because the yetzer hara (יצר הרע), the evil inclination, holds no sway over angels (Genesis 18:5). Having no need for earthly food, the guests told him, "Do as you have spoken," and blessed him to prepare another feast for a son soon to be born.

Abraham hurried inside to Sarah and asked for three measures of fine meal (Genesis 18:6). Because it was the eve of Passover, Sarah kneaded nine measures in all, setting aside three for cakes, three for porridge, and three for delicacies. Abraham then ran to the herd, chose a calf tender and good, and handed it to young Ishmael so the boy would learn to perform commandments with his own hands (Genesis 18:7).

Every modest word Abraham spoke that afternoon became a promise God repaid to Israel across generations. His offer of a little water earned his children the well in the wilderness, streams in the land, and living waters flowing from Jerusalem (Numbers 21:17; Deuteronomy 8:7; Zechariah 14:8). Shade under the tree won them the clouds of glory and festival booths (Psalms 105:39; Leviticus 23:42), his morsel of bread brought down manna from heaven (Exodus 16:4), and his run to the herd sent a wind carrying quail across the camp (Numbers 11:31).

Two Angels Who Walked Slowly to Sodom

The visitors left Abraham's tent at noon, yet they did not reach Sodom until evening, an astonishing delay for heavenly beings who move like lightning (Ezekiel 1:14; Genesis 19:1). Only two of the three made the journey, because no single angel carries two separate missions and no two angels share one. Michael had already delivered the promise of Isaac's birth and withdrawn, so Gabriel went to overturn Sodom and Raphael went to rescue Lot.

Both travelers were angels of mercy, so they walked slowly down the road in hope that Abraham might still uncover some merit for the doomed city behind them. Only when Abraham found nothing worth sparing did Sodom's sun go down and its sentence stand sealed. Once the Divine Presence drew back and the hour of their office arrived, they stopped looking like ordinary men and stood before Lot in the unmistakable form of angels.

The Crooked Path and the Quarrel Over Salt

Lot sat in the gate as chief among the judges of Sodom when the two angels approached at dusk. Knowing how his neighbors treated strangers, he bowed and urged them to take a crooked, roundabout route to his door so no townsman would watch them enter (Genesis 19:2). Unlike Abraham, who insisted that guests wash their feet immediately, Lot invited them to stay the night first and wash afterward. Some held that Lot was simply less strict about the dust of idolatry, while others said he acted shrewdly so the travelers would still carry road dust on their feet at dawn and no neighbor would guess they had lodged indoors.

At first the angels refused and answered, "No, we will spend the night in the street," because a traveler may decline a lesser host even when he would never turn down Abraham. Lot pressed them relentlessly until they turned aside into his house, where he laid out a feast in Abraham's manner and baked unleavened bread (Genesis 19:3). Inside the house, however, a fierce quarrel broke out over salt. "Give these guests a little salt," Lot told his wife. "This evil custom too you wish to introduce here?" she snapped back, and her anger carried the secret of his guests straight into the town.

The Night the Angels Stopped Listening

Before anyone lay down to sleep, the men of Sodom arrived at the door and demanded to know who was inside. Lot tried to parry their questions, telling them that every city holds good people and bad, though in Sodom the majority were bad. Soon every man of the town, without a single holdout, surrounded the house (Genesis 19:4). Through the night Lot pleaded with the angels for mercy on Sodom's behalf, and the angels patiently heard him out. Then the crowd outside shouted, "Bring them out to us, that we may know them," and every defense vanished (Genesis 19:5).

At that cry the angels cut off Lot's appeal and asked him, "Whom else have you here?" (Genesis 19:12). Lot understood who stood inside his room and why they had come at all. They were divine beings who had stepped under the shadow of his roof by the merit of Abraham rather than his own (Genesis 19:8).


← All myths

From the tradition

Sources

7 sources

The texts behind this telling. Some cards carry a translation of the source; others are our own retelling of it, and each card says which. Every card links out to the original.

Yalkut Shimoni on Torah 82:10Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

Abraham said: before I was circumcised, the passersby used to come to me. Do you mean to say that now, since I have been circumcised, they no longer come to me? The Holy One, blessed be He, said to him: before you were circumcised, uncircumcised human beings used to come to you; now I Myself in My glory am revealed to you. This is what is written, "And the LORD appeared to him in the plains of Mamre" (Genesis 18:1).

Full source
Yalkut Shimoni on Torah 82:11Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

Portion Vayera. (Genesis 18:1) It is written, "After the LORD your God you shall walk" (it is written in Remez 16 and in Remez 33). (Job 19:26) "And after my skin has been thus destroyed, yet from my flesh I shall behold God." Abraham said: After I circumcised myself, many proselytes come to attach themselves to this sign of the covenant. "And from my flesh I shall behold God", had I not done so, from where would the Holy One, blessed be He, have revealed Himself to me? "And the LORD appeared to him." Rabbi Levi opened: (Leviticus 9:4) "And an ox and a ram for peace-offerings, to sacrifice before the LORD" etc. They said: If this one who offered an ox and a ram to My name, behold, I reveal Myself to him and bless him; Abraham, who circumcised himself for My name, how much more so! "And the LORD appeared to him." (Isaiah 33:15) "He who walks in righteousness", this is Abraham, as it is said, "And they shall keep the way of the LORD to do righteousness." (ibid.) "And speaks uprightly", "Far be it from you." "Who despises the gain of oppressions", (Genesis 14:23) "if from a thread to a shoe-strap." (ibid.) "Who shakes his hands free of holding a bribe", "I have lifted up my hand to the LORD." (Isaiah 33:16) "He shall dwell on high", He raised him up above the vault of the firmament, as it is said (Genesis 15:5), "Look now toward the heavens" etc., as above. (ibid.) "The fortresses of rocks shall be his stronghold", these are the clouds of glory. "His bread shall be given", (below, verse 5) "And I will fetch a morsel of bread." "His waters shall be sure", (below, verse 4) "Let now a little water be fetched." (Isaiah 33:17) "Your eyes shall behold the King in His beauty", "And the LORD appeared to him." Rav Chama bar Chanina said: That day was the third day of Abraham's circumcision, and the Holy One, blessed be He, came and inquired after him. A parable of a certain shopkeeper who had a friend who was a priest, and there was an impurity in his courtyard. The priest said to him: If you wish that I enter your courtyard, clear away the impurity from it. He arose and cleared it, and the priest entered the courtyard. So too the Holy One, blessed be He, was a friend to Abraham, but the foreskin was hanging upon him; and as soon as he was circumcised, immediately "And the LORD appeared to him." Rabban Gamliel the son of Rabbi Yehudah the Prince [taught]: When our father Abraham was circumcised, on the third day he had very great pain in his wound. What did the Holy One, blessed be He, do (to test him)? He bored a hole out of Gehinnom and heated the world like the day of the wicked; and he went out and sat at the entrance of the tent in the heat of the day. The Holy One, blessed be He, said to the ministering angels: Let us go down and visit the sick one. The Holy One, blessed be He, said to the angels: Come and see the power of circumcision, before he was circumcised he would fall upon his face, and afterward I would speak with him; but now that he is circumcised he sits, while I stand and he sits. "And You gave me the shield of Your salvation", this is Abraham: (Genesis 15:1) "I am a shield to you." (Psalms, ibid.) "And Your right hand supported me", in the fiery furnace, in the famine, and against the kings. (ibid.) "And Your humility (anvatkha) made me great", what humility did the Holy One, blessed be He, multiply toward Abraham, that he sat while the Shekhinah stood? As it is said, "And he sits", it is written "sitting (yosheiv)." He sought to rise. The Holy One, blessed be He, said to him: Sit; you are a sign for your children: just as you sit while the Shekhinah stands, so your children sit while the Shekhinah stands, as it is said, "God stands (nitzav) in the assembly of God", "standing (omeid)" is not written, but "nitzav," which means ready (itimos), as you say (Exodus 33:21), "And you shall station yourself (ve-nitzavta) for Me there upon the rock." "The entrance of the tent", a good entrance you opened for the passersby; a good entrance you opened for proselytes. "The tent", for were it not for you, I would not have created the heavens and the earth, "And He stretched them out like a tent to dwell in"; were it not for you, I would not have created the orb of the sun, (Psalms 19:5) "For the sun He set a tent among them"; were it not for you, I would not have created the moon, (Job 25:5) "Behold, even the moon and it gives no light (lo ya'ahil)." Rabbi Levi said: In the time to come, Abraham will sit at the entrance of Gehinnom and will not permit any circumcised man of Israel to go down into it. And those who sinned too much, what does he do to them? He removes the foreskin from infants who died before they were circumcised, and sets it upon them, and brings them down into Gehinnom. This is what is written, "He has put forth his hands against those at peace with him; he has profaned his covenant." "In the heat of the day", when that day comes, (Malachi 3:19) "For behold, the day comes, burning like a furnace." "In the heat of the day", it was taught: (Exodus 16:21) "And the sun grew hot and it melted", at the fourth hour, or is it only at the sixth hour? When it says "in the heat of the day," the sixth hour is meant. Or [is it] the reverse? At the fourth hour the shade is cool and the sun is hot; at the sixth hour both the shade and the sun are hot, and there is no shade for a creature beneath it. "In the heat of the day", a hole was bored from Gehinnom and it heated the whole world for a brief moment. The Holy One, blessed be He, said: This righteous one is in pain while the world is at ease? "In the heat of the day", this tells that warm things are good for a wound. (Genesis 18:2) He said: Before I was circumcised the passersby would come to me; will you say that since I was circumcised they do not come to me? The Holy One, blessed be He, said to him: Before you were circumcised, uncircumcised men would come to you; now I and My retinue reveal ourselves to you. This is what is written, "And he lifted up his eyes and saw, and behold, three men were standing over him." "And he saw", "and he saw" the Shekhinah, "and he saw" the angels. Rabbi Chanina said: New names they brought up with them from Babylon. Reish Lakish said: Even the names of the angels, Michael, Gabriel, Raphael. Rabbi Levi said: One appeared to him in the likeness of a Saracen, one appeared to him in the likeness of a sailor, and one appeared to him in the likeness of an Arab. He said: If I see that the Shekhinah waits for them, I know that they are fitting men; and if I see that they show honor to one another etc. As soon as he saw that the Shekhinah waited for them and that they showed honor to one another, he knew that they were fitting. Rabbi Abahu said: The pavilion of Abraham our father was open at both ends, like that of Romulus, who said: If I see that they have gone a distance etc. etc., I know that they are coming to me. As soon as he saw that they had gone a distance, immediately "And he ran to meet them." "And the LORD appeared to him", that day was the third day of his circumcision. What did the Holy One, blessed be He, do? He brought the sun out of its sheath so that he would not be troubled. He said to Eliezer: Rise, look in the marketplace whether wayfarers are coming. He rose and looked, and came back to him. He said: They are not coming. Abraham said: My servants have no trustworthiness. He arose and went out himself. He did not see [anyone]. The Holy One, blessed be He, saw that he was untying and binding [his wound]. He said: It is not the way of the world to remain standing here; and this is what is written, "Pass not, I pray, from over Your servant." It was taught: Three who are walking on the way, the master in the middle, the greater at his right and the lesser at his left. And so we find with the three ministering angels who came to Abraham: Michael in the middle, Gabriel at his right, and Raphael at his left. Explain it as moving sideways. But one who walks at his master's right is a boor, and behind his master is of the arrogant of spirit. "One does not exchange honors on the roads", and look there. It is written, "And he lifted up his eyes and saw," and it is written, "And he ran to meet them." When they saw that he was untying and binding [his wound], they withdrew; immediately "And he ran to meet them." Who are the three men? Michael, Gabriel, and Raphael. Michael came to bring tidings to Sarah, and Raphael came to heal Abraham, and Gabriel came to overturn Sodom. But is it not written (Genesis 19:1), "And the two angels came to Sodom"? That [other] one came to rescue Lot. This is precise, for it is written, "And he overturned." What is different concerning Abraham, that it is written (below, verse 5), "So do as you have said," and what is different concerning Lot, that it is written, "And he urged them greatly"? From here [we learn] that one refuses the lesser but does not refuse the greater. (Genesis 18:3) Rabbi Yochanan said: The welcoming of guests is as great as the rising early to the house of study, for it is taught: One may clear away even four or five baskets of straw and of grain on account of the guests and on account of the neglect of the house of study. Rav Dimi of Nehardea said: Greater than rising early to the house of study, for it is taught: "On account of the guests" first. Rav Yehudah said in the name of Rav: The welcoming of guests is greater than receiving the face of the Shekhinah, for it is written, "And he said: If now I have found favor in Your eyes, pass not, I pray, from over Your servant." Rabbi Elazar said: Come and see that the attribute of the Holy One, blessed be He, is not like the attribute of flesh and blood. The attribute of flesh and blood is that a lesser one does not say to a greater one, "Wait for me until I come to you"; but concerning the Holy One, blessed be He, it is written, "Pass not, I pray, from over Your servant." Rabbi Yochanan said: Six things, when a person does them, he eats their fruits in this world and the principal endures for him in the World to Come; and these are they: the welcoming of guests, visiting the sick, rising early to the house of study, attentiveness in prayer, raising one's children to the study of Torah, and judging one's fellow favorably. And to these also belong honoring father and mother, acts of lovingkindness, and bringing peace between a person and his fellow; and the study of Torah is equal to them all. All the names stated concerning Abraham are sacred, except for this one, which is profane: "And he said, My lords (Adonai), if now I have found favor in your eyes." Chananyah the son of Rabbi Yehoshua's brother and Rabbi Eliezer in the name of Rabbi Elazar of Modiin said: This one too is sacred. According to whom does that go which Rav Yehudah said in the name of Rav, "The welcoming of guests is greater than receiving the face of the Shekhinah"? According to whom? According to that pair.

Full source
Yalkut Shimoni on Torah 82:12Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

"Let a little water be taken" (Genesis 18:4-6). The Holy One, blessed be He, said to him: you said "let it be taken"; in that same language I will redeem your children, "And I will take you to Me for a people" (Exodus 6:7). That is in this world; in the world to come, from where? "And I will take you, one from a city" (Jeremiah 3:14). Rabbi Eliezer in the name of Rabbi Simon said, the Holy One, blessed be He, said to our father Abraham: you said "let a little water be taken"; by your life, I will repay your children, as it is written, "Then Israel sang this song, Rise up, O well" (Numbers 21:17). That is in the wilderness; in the land of Canaan, from where? "A land of streams of water" (Deuteronomy 8:7). In the time to come, from where? "On that day living waters shall go out from Jerusalem" (Zechariah 14:8). You said "and wash your feet"; by your life, I will repay your children, "And I washed you with water" (Ezekiel 16:9). That is in the wilderness; in the land, from where? "Wash, make yourselves clean" (Isaiah 1:16). In the time to come, from where? "When the LORD has washed away the filth of the daughters of Zion" (Isaiah 4:4). You said "and recline under the tree"; by your life, I will repay your children, "He spread a cloud for a covering" (Psalms 105:39). That is in the wilderness; in the land, from where? "In booths you shall dwell seven days" (Leviticus 23:42). In the time to come, from where? "And a booth shall be for shade by day" (Isaiah 4:6). You said "and I will fetch a morsel of bread"; by your life, I will repay your children, "Behold, I will rain down bread for you" (Exodus 16:4). That is in the wilderness; in the land, from where? "A land of wheat and barley" (Deuteronomy 8:8). In the time to come, from where? as it is said, "May there be an abundance of grain in the land on the tops of the mountains" (Psalms 72:16). "And to the herd Abraham ran" (Genesis 18:7) - by your life, I will repay your children, "And a wind went out from the LORD and brought quails" (Numbers 11:31). That is in the wilderness; in the land, from where? "And the children of Reuben had much cattle" (Numbers 32:1). In the time to come, from where? "And it shall be on that day that a man shall rear a young cow" (Isaiah 7:21). "And he stood over them" (Genesis 18:8) - by your life, I will repay your children, "And the LORD went before them by day" (Exodus 13:21). That is in the wilderness; in the land, from where? "God stands in the assembly of God" (Psalms 82:1). In the time to come, from where? "The breaker has gone up before them" (Micah 2:13). "And wash your feet" - they said to him, do you perhaps think us like Arabs who bow down to the dust of their feet? Ishmael has already issued from you. Rav Yehudah said in the name of Rav, everything Abraham did for the ministering angels, the Holy One, blessed be He, did Himself for Abraham's children by Himself; and everything Abraham did for the angels by means of a messenger, the Holy One, blessed be He, did for his children by means of a messenger. "And to the herd Abraham ran" - "And a wind went out from the LORD" (Numbers 11:31). "And he took curds and milk and set it before them" - "Behold, I will rain down bread for you." "And he stood over them" - "Behold, I stand before you there upon the rock" (Exodus 17:6). "And Abraham went with them to send them off" - "And the LORD went before them by day" (Exodus 13:21). "Let a little water be taken" - "And you shall strike the rock, and water shall come out of it." This differs from Rav Chama bar Chanina, who said: as the reward for three things they merited three things. As the reward for the curds and milk they merited the manna; as the reward for "and he stood over them" they merited the pillar of cloud; as the reward for "let a little water be taken" they merited the well of Miriam. It is written, "and I will fetch a morsel of bread," and it is written, "and he took curds and milk." Rabbi Eliezer said, the righteous say little and do much; the wicked say much and do not perform even a little - as we learn from Ephron, of whom it is written, "a land worth four hundred shekels of silver" (Genesis 23:15), and it is written, "And Abraham listened," yet he weighed out for him not ordinary shekels but the heaviest centenaria. It is written "flour" and it is written "fine flour" - from here we learn that a woman is more grudging toward guests than a man.

Full source
Yalkut Shimoni on Torah 82:13Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

Rabbi Yitzhak said: In the Torah, in the Prophets, and in the Writings we find that bread is nourishment for the heart. In the Torah: "Let me fetch a morsel of bread, and refresh your hearts [literally, your heart]" (Genesis 18:5). In the Prophets: "Refresh your heart with a morsel of bread" (Judges 19:5). In the Writings: "And bread sustains the heart of man" (Psalms 104:15).

Rabbi Aha said: It is not written here "refresh your hearts [levavkhem]," but "refresh your heart [libkhem]." This teaches that the evil inclination [yetzer hara] does not rule over the angels. As Rabbi Aha said of the verse "Set your heart [libkhem, singular form] upon her ramparts" (Psalms 48:14), this teaches that there is no evil inclination in the time to come.

"Since you have passed by your servant" (Genesis 18:5): From the day the Holy One, blessed be He, created His world, you were appointed to come to me. And they said, "Do as you have spoken" (Genesis 18:5). We have no eating and drinking before us; you, before whom there is eating and drinking, do so for yourself. "As you have spoken": may it be His will that you merit to make another feast for a male son who will be born to you.

"And Abraham hurried into the tent to Sarah" and said, "Hurry, three measures [of meal]" (Genesis 18:6). Nine measures she baked: three for cakes, three for porridge, three for delicacies. "Knead it and make cakes": this teaches it was the eve of Passover. Rabbi Yonah in the name of Rabbi Hama bar Hanina: the wilderness of Sin, the wilderness of Alush, and the wilderness of Kadesh are one. By what merit did Israel merit that manna was given them in the wilderness? By the merit of Abraham, who said, "Knead it and make cakes." "And Abraham ran to the herd" (Genesis 18:7): Rabbi Levi said, he ran to anticipate that nation of which it is written, "a trained heifer that loves to thresh" (Hosea 10:11). "And he took a calf" (Genesis 18:7): one might think a large one, so Scripture says "tender." If tender, one might think weak, so Scripture says "and good." "And gave it to the lad" (Genesis 18:7): this is Ishmael, in order to train him in the commandments.

Full source
Yalkut Shimoni on Torah 84:2Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

"And the two angels came to Sodom at evening" (Genesis 19:1). It is written, "And the living creatures ran and returned" (Ezekiel 1:14). It does not say "ran" [in the ordinary feminine form], but "ratzo" [an unusual form, read as eager running]: they run to perform His mission. They had taken leave of Abraham at the sixth hour, yet they came to Sodom at evening. Rather, they were angels of mercy, and they delayed, thinking perhaps Abraham might find them some merit. Once he found no merit for them, "the two angels came to Sodom at evening." It is taught: no single angel performs two missions, nor do two angels perform one mission. Yet you say two angels [came]? Rather, Michael had delivered his message [of Isaac's birth] and withdrew; Gabriel was sent to overturn Sodom, and Raphael to rescue Lot. "And the two angels came to Sodom" (Genesis 19:1). Here you say "angels," but earlier (Genesis 18:2) it says "men": earlier, when the Divine Presence rested upon them, it called them men; here, when the Presence had departed from them, they took on the form of angels. Rabbi Tanchuma said in the name of Rabbi Levi: to Abraham, whose strength was great, they appeared as men; but to Lot, because his strength was weak, they appeared as angels. Rabbi Chanina said: before they performed their mission it called them men, once they performed their mission, angels. Rabbi Tanchuma said a parable: like one who receives a governorship from the king; before he reaches his office he walks like an ordinary man, but once he reaches his office he walks with dignity. So before they performed their mission they were still "men," once they performed it, "angels." "To Sodom" [Sedomah]: it was taught in the name of Rabbi Nechemiah, any word that requires a lamed at its beginning [meaning "to"], give it a heh at its end: Sedomah [to Sodom], Se'irah [to Seir], Mitzraymah (Genesis 12:10) [to Egypt], Charanah [to Haran]. They objected to him: but is it not written, "The wicked shall return to Sheol" (Psalms 9:18) [She'olah, with a final heh]? Rabbi Abba bar Zavda said: to the lowest chamber of Sheol.

"At evening": the evening of Sodom had come, its sun had set, and its sentence was sealed. Rabbi Levi said: the Holy One, blessed be He, judges the nations of the world only at night, when they are asleep from their transgressions, and judges Israel only by day, when they are occupied with the commandments, as it is written, "And He shall judge the world in righteousness" (Psalms 9:9). "And Lot sat in the gate of Sodom" (Genesis 19:1): it is written "sat" [in a form suggesting he had just sat down]: that very day they had appointed him chief of the judges. There were five chief judges in Sodom: Liar, Master-Liar, Master-Scoundrel, Master-of-Perversions, and Bend-the-Law, and Lot was chief judge over them all. When he spoke words pleasing to them, they would say, "Step over here, rise higher"; and when he spoke words not pleasing to them, they would say, "This one came to sojourn [and would set himself up as judge]" (Genesis 19:9).

This is what the verse says: "He who walks with the wise grows wise, but the companion of fools suffers harm" (Proverbs 13:20). "He who walks with the wise": to what is he like? To a man who enters a perfumer's shop; even though he neither took nor gave, he carries away a good scent. "The companion of fools": to what is he like? To one who enters a tanner's shop; even though he neither took nor gave, he carries away a foul smell. So Lot, when he walked with Abraham our father, learned from his ways. Abraham our father had made a house outside Haran, and whoever entered or left, he received him, fed him, gave him drink, and said, "The God of Abraham is one in the world." When Lot came to Sodom he did the same; but once they proclaimed that anyone who put bread in the hand of a stranger would be burned, he was afraid to do it by day, so he did it by night. As it is said, "And the two angels came to Sodom at evening." And just as he supported them, they supported him, and said to him, "Do not look behind you, for the Divine Presence has come down," and so on. Idit, Lot's wife, her compassion was stirred for her married daughters in Sodom, and she looked behind her to see whether they were following her or not, and she saw the Divine Presence behind her, and she became a pillar of salt.

Full source
Yalkut Shimoni on Torah 84:3Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

"And he said, Behold now, my lords" (Genesis 19:2). Rabbi Yudan said: [Lot meant] even if I am not worthy, bend the road aside on my account [come by way of my house]. Rabbi Huna said: [he meant] bend the road aside for me, so that you not be seen coming to my house [directly, lest the Sodomites notice]. "Turn aside to your servant's house, and stay the night, and wash your feet": Abraham would put washing before lodging, but Lot put lodging before washing. The difference: Abraham was strict about the dust of idolatry [and wanted feet washed at once], while Lot was not strict. And some say: even in this Lot acted properly, so that they would go out in the morning and people would see dust on their feet and not say, "Where did they lodge?"

"And they said, No, but we will spend the night in the street": one may refuse a lesser person but not a greater one. "And he pressed them greatly" (Genesis 19:3): he forced his way upon them with insistence and trouble, "and they turned in to him and entered his house." This supports the one who said: bend the road aside so that you not be seen coming to me. "And he made them a feast": it was in the manner of Abraham, who received passersby. "And he baked unleavened bread, and they ate": Rabbi Yitzchak said: a great quarrel arose over the salt, for he said to her [his wife], "Give these guests a little salt," and she said to him, "This evil custom too you wish to introduce here?" [She betrayed his hospitality to the townsfolk.]

"Before they lay down" (Genesis 19:4), the men of the city began asking him questions. The men of the city, the men of Sodom, said to him, what are they? He said to them: every place has good people and bad, but here the majority are bad. And the men of the city, the men of Sodom, surrounded the house, not one of them holding back. "And they called to Lot and said to him" (Genesis 19:5-8). Rabbi Yehoshua ben Levi said in the name of Rabbi Pedaya: all that night Lot was pleading for mercy on behalf of the Sodomites, and they [the angels] were accepting it from him. But once they said, "Bring them out to us, that we may know them" [carnally], they said to him (Genesis 19:12), "Whom else have you here?" Read it: you no longer have a mouth [permission]; until now you had leave to plead their defense, from now on you have no leave. "Only to these men do nothing" harsh [Lot said, pleading for his guests].

Full source
Yalkut Shimoni on Torah 84:4Yalkut Shimoni on Torah

Translation of the source text.Torat Emet (Yalkut Shimoni) · CC-BY-NC

Another interpretation: "these are divine beings" [Lot recognized them as angels]. "For this reason they have come under the shadow of my roof" (Genesis 19:8): not by my own merit, but by the merit of Abraham.

Full source