Deuteronomy 7:3
1 When the Lord your God brings you to the land that you are going to occupy and forces out many nations before you—Hittites, Girgashites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites, seven nations more numerous and powerful than you— 2 and he delivers them over to you and you attack them, you must utterly annihilate them. Make no treaty with them and show them no mercy! 3 You must not intermarry with them. Do not give your daughters to their sons or take their daughters for your sons, 4 for they will turn your sons away from me to worship other gods. Then the anger of the Lord will erupt against you and he will quickly destroy you. 5 Instead, this is what you must do to them: You must tear down their altars, shatter their sacred pillars, cut down their sacred Asherah poles, and burn up their idols.
Ezra 10:2
1 While Ezra was praying and confessing, weeping and throwing himself to the ground before the temple of God, a very large crowd of Israelites—men, women, and children alike—gathered around him. The people wept loudly. 2 Then Shecaniah son of Jehiel, from the descendants of Elam, addressed Ezra: “We have been unfaithful to our God by marrying foreign women from the local peoples. Nonetheless, there is still hope for Israel in this regard. 3 Therefore let us enact a covenant with our God to send away all these women and their offspring, in keeping with your counsel, my lord, and that of those who respect the commandments of our God. And let it be done according to the law. 4 Get up, for this matter concerns you. We are with you, so be strong and act decisively!”
Notes and References
"... Many scholars have assumed that, when Shecaniah said that intermarriage should be counteracted “in accordance with the Torah,” he was saying that intermarriage was prohibited by the Torah of Moses. There is a strong pentateuchal basis for such a prohibition. The Pentateuchal source that is repeatedly cited is Deuteronomy 7:3 “do not make marriages with them; do not give your daughter to his son; and do not take his daughter for your son.” However, it must be noted that this prohibition is specifically about the local nations and does not reflect a general prohibition against intermarriage. Furthermore, despite very insightful and creative attempts to explain the relationship between earlier pentateuchal traditions and Ezra’s prohibition, Deuteronomy contains no explicit commandment to divorce foreign women and to expel their children. Indeed, there is no general prohibition against intermarriage anywhere in the Pentateuch. How are we to explain Shecaniah’s claim that this law is Torah? Is it new law? Or, is it part of the old Mosaic Torah? Most scholars agree that we should understand this passage from Ezra as an early example of interpretation of earlier biblical traditions—namely, that Ezra interprets texts like Deuteronomy 7, and thereby claims that the resulting law reflects the correct reading of what was intended by Moses in the Torah. (For texts which are contemporaneous with Ezra 10 and reflect a similar position, namely that intermarriage is tantamount to treachery, see Ezra 10:2; 10:5; 10:10; Nehemiah 1:8; 13:25–27) Indeed the same story could be told about Ezra’s priestly courses—namely, that this organization of the priests and levites is said to be what Moses intended, or what David and Solomon envisioned ..."
Najman, Hindy Seconding Sinai: The Development of Mosaic Discourse in Second Temple Judaism (pp. 113-114) Brill, 2003