Wasn’t abandoning wives and children a drastic solution? (Ezra 10:3) Ezra 10 New International Version (NIV) The People’s Confession of Sin 10 While Ezra was praying and confessing, weeping and throwing himself down before the house of God, a large crowd of Israelites—men, women and children—gathered around him. They too wept bitterly. 2 Then Shekaniah son of Jehiel, one of the descendants of Elam, said to Ezra, “We have been unfaithful to our God by marrying foreign women from the peoples around us. But in spite of this, there is still hope for Israel. 3 Now let us make a covenant before our God to send away all these women and their children, in accordance with the counsel of my lord and of those who fear the commands of our God. Let it be done according to the Law. 4 Rise up; this matter is in your hands. We will support you, so take courage and do it.”
Ezra 10:1 - 44
ESV - 1 While Ezra prayed and made confession, weeping and casting himself down before the house of God, a very great assembly of men, women, and children, gathered to him out of Israel, for the people wept bitterly. 2 And Shecaniah the son of Jehiel, of the sons of Elam, addressed Ezra: "We have broken faith with our God and have married foreign women from the peoples of the land, but even now there is hope for Israel in spite of this.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.