Fascinating part of the story of Israel here. Ezra is given the power by the king to go back to Jerusalem and set shop back up. He is given the power to gather as many Israelites who would want to go with him along with offerings and the elements of the temple that would be used to make sacrifices. That is quite a bit of valuable material that the king allows Ezra to take with him to a foreign land as a foreigner. The motivation on the part of the king one can only guess, but I'm guessing that the king respected the power of the Lord and knew that if he fell in God's good graces that couldn't hurt him.
So Ezra gathers the people who volunteer to go and notices that none of the Levites are accounted for. He remedies that and then gets set to set out. Once he is on his journey it comes to his attention the sinfulness of Israel can be found primarily in the fact that daughters and sons have married foreign spouses and have turned from God to the gods of their spouses. As a result he requires that all of those who are married to foreign spouses must kick out the spouses along with the children created with those spouses. Sounds pretty drastic and draconian but that is how we finish Ezra. The people of God are now pure without any foreign influence. Wow.
Psalms 33 and 35 reflect the trust that the people have in God and that he will turn away all those who seek the harm of the people of Israel.