His task is to rebuild the walls and to re-populate the city. He faces opposition from three powerful neighbours, the Samaritans, the Ammonites, and the Arabs, as well as the city of Ashdod, but manages to rebuild the walls. He then purifies the Jewish community by enforcing its segregation from its neighbours and enforces the laws of Moses.