Where It All Goes Down
Ancient Judah and The Persian Empire, c. 600-450 B.C.E.
The Books of Ezra and Nehemiah are both set in Judah while it's ruled by the Persian Empire, the most powerful empire in the known world at the time. Unlike Nebuchadnezzar and the Babylonian rulers, the Persian emperor Cyrus the Great is a pretty reasonable guy who gives the House of Israel the authorization to return to Jerusalem and Judah and rebuild.
Most of the action takes place in Jerusalem and some surrounding towns, much of which were reduced to rubble by the Babylonians. The temple's destroyed and the city's walls are gone, leaving it vulnerable to attack. The area's populated by foreigners from Assyria who were brought in when the inhabitants of the Northern Kingdom were sent into exile. There are also many of the lower classes of Judeans who were left behind by the Babylonians. They don't like the fact that these returnees seem to think they can just come in and take over again. They try to convince the Persian king that the Israelites are secretly planning rebellion once they get settled. The text suggests that even after the first exiles return, there's more destruction of the city by the enemy tribes. So there's a great deal of social unrest.
So it's not exactly a situation of bliss and contentment. Judah isn't an independent political entity anymore. Foreigners reside in the holy city. This is still a somewhat humiliating state of affairs in the eyes of Ezra and Nehemiah. But the Persian kings—including Artaxerxes, even though he stops the construction on the Second Temple for a little while—are benevolent and helpful. All the building and repair takes place with their complete encouragement and approval and largely at their expense. A modest version of the temple gets built and the city walls are reinforced.
Judah's getting a trial run, essentially—a safe zone, under responsible rulers, in which they can try to be obedient to God and Empire. The Persian Empire might not be the ideal, but it's functional, economically prosperous, and well-governed.
One of the problems reflected in these books is that the original exiles to Babylon were the upper classes, skilled workers, and officials; there were many people left behind and they were mostly poorer farmers who were allowed to stay to keep the land productive. That probably wasn't easy, since the war had depopulated the land, destroyed infrastructure, and ruined the crops. So when the descendants of the exiles began to return to Judah expecting to take back their property, this didn't sit well with the people who had remained there all along, struggling to keep going. This could have been why the Persian kings were anxious to get stable governance in the area and were willing to pay for it.