Israel’s greatest problem throughout its history was syncretism-the mixing of pagan religion with worship of the true God. God judged Israel severely for failing to keep worship clean and pure. And one of the easiest inroads to Israel’s heart was through intermarriage with pagan people’s Ezra knew this well, thus his vehement and emotional opposition to taking foreign spouses.
God’s overriding concern was that the nation of Israel be distinct from surrounding nations, they witnessed to other nations of they glory of God above all other gods. So the injunction against intermarrying was to prevent the loss of witness to the truth, as with Solomon whose several foreign wives were said to turn his heart from God (1 Kings 11:1-13).
The prohibition against intermarriage was not absolute. Deuteronomy 21 contains regulations for marrying women taken captive in war. Examples of interracial marriage include Moses and a Midianite woman. Boaz and the Moabite Ruth. The key issue is faithfulness to Christ. Any marriage that jeopardizes faith is wrong.