Ezra and his entourage of 1500 camp out and fast for three days while praying to god about whether they should accept protection from the Persians as they travel to Jerusalem. He smartly divides his gold stockpile up and gives some of it to the priests to bring to Jerusalem, then leaves himself, sans soldiers.
The Israelites are still sinning! Now they've been polluting the blood with foreign wives and the priests and princes have been leading the charge! Ezra gets upset and prays to god for advice.
The Israelites decide the best way to get back into god's good graces is to send their foreign wives away. So they call everybody to the temple, where they tell them to either send their wives away or be excommunicated. Would you worship a god that demanded that? But they agree to do it.