On that day Judah, an Ammonite convert, came and stood before them in the house of study. He said to them: Do I have the right to enter into the assembly? Rabban Gamaliel said to him: you are forbidden. Rabbi Joshua said to him: you are permitted. Rabban Gamaliel said to him: the verse says, "An Ammonite or a Moabite shall not enter into the assembly of the Lord: even to the tenth generation" (Deuteronomy 23:4). R. Joshua said to him: But are the Ammonites and Moabites still in their own territory? Sanheriv, the king of Assyria, has long since come up and mingled all the nations, as it is said: "In that I have removed the bounds of the peoples, and have robbed their treasures, and have brought down as one mighty the inhabitants" (Isaiah 10:1. Rabban Gamaliel said to him: the verse says, "But afterward I will bring back the captivity of the children of Ammon," (Jeremiah 49:6) they have already returned. Rabbi Joshua said to him: [another] verse says, "I will return the captivity of my people Israel and Judah" (Jeremiah 30:3). Yet they have not yet returned. So they permitted him to enter the assembly.
Rabban Gamliel said to him: You are forbidden to enter into the congregation. Rabbi Yehoshua said to him: You are permitted to enter into the congregation. Rabban Gamliel said to Rabbi Yehoshua: Wasn’t it already stated: “An Ammonite and a Moabite shall not enter into the congregation of the Lord; even to the tenth generation shall none of them enter into the congregation of the Lord forever” (Deuteronomy 23:4)? How can you permit him to enter the congregation? Rabbi Yehoshua said to Rabban Gamliel: Do Ammon and Moab reside in their place? Sennacherib already came and, through his policy of population transfer, scrambled all the nations and settled other nations in place of Ammon. Consequently, the current residents of Ammon and Moab are not ethnic Ammonites and Moabites, as it is stated in reference to Sennacherib: “I have removed the bounds of the peoples, and have robbed their treasures, and have brought down as one mighty the inhabitants” (Isaiah 10:13). And although it is conceivable that this particular convert is an ethnic Ammonite, nevertheless, there is no need for concern due to the halakhic principle: Anything that parts from a group parts from the majority, and the assumption is that he is from the majority of nations whose members are permitted to enter the congregation.
As, isn’t it taught in a baraita that Rabbi Yehuda said: Minyamin, an Egyptian convert, was a friend of mine from among the students of Rabbi Akiva, and he said: After I converted I was a first-generation Egyptian convert, and so I married another first-generation Egyptian convert. I will marry off my son, who is a second-generation Egyptian convert, to another second-generation Egyptian convert, so that my grandson will be fit to enter into the congregation. This indicates that first- and second-generation converts of Egyptian extraction were prohibited from entering into the congregation even during the period of the Mishna.
...