Ezra 9:11
Which thou hast commanded by thy servants the prophets, saying, The land, unto which ye go to possess it, is an unclean land with the filthiness of the people of the lands, with their abominations, which have filled it from one end to another with their uncleanness.
The verse belongs to a prayer in which Ezra humbled himself before God, confessing his own sins and the sins of his people and entreating pardon as if he himself were the offender. The prayer was offered while he was patiently toiling and praying and suffering in the work of reform amid open hostility from the heathen and still harder secret opposition from pretended friends whose influence served evil, aided God's enemies, and warred against the plain requirements of God. It recalls a commandment of God given by His servants the prophets warning that the land Israel went to possess was unclean with the filthiness, abominations, and uncleanness of the peoples of the lands, which filled it from one end to another.
The command required Israel to keep separate and not join in affinity with those peoples through mingling and intermarriage. The prohibition on mingling and joining in affinity was given as a safeguard against apostasy. Israel's disregard of the command largely caused apostasy and brought the Babylonish captivity, in which for iniquity they were delivered to the sword, to captivity, to spoil, and to confusion of face.
After that captivity God punished Israel less than their iniquities deserved and showed great grace by leaving them a remnant to escape, giving them a foothold in their native land described as a nail in His holy place, lightening their eyes, giving them a little reviving in bondage, extending mercy to them in the sight of the kings of Persia, helping them to set up His house and repair its desolations, and giving them a wall in Judah and in Jerusalem. To break the commandment again after such deliverance is ingratitude that would provoke God's anger until He consumed them so that there should be no remnant nor escaping. The righteous Lord God of Israel had kept them escaped to that day, yet in trespass they stand before Him and cannot stand before Him because of it.