Nehemiah 7:
Detail with the wall completed, Nehemiah turns his attention to other necessary matters and deals first with Jerusalem's security and repopulation.Â
He appoints trusted men, including his brother Hanani, and orders that the gates stay shut until the sun is hot to prevent the enemy from making a surprise attack before most of the people were up.
Jerusalem was still underpopulated at this because many returning exiles may not have been from Jerusalem and naturally returned to their own hometowns. Â
So God moves Nehemiah to find the genealogical record; ultimately this was God's initiative rather than Nehemiah's plan, and the list is virtually identical with the list in Ezra 2.