Now when the wall had been built and I had set up the doors, and the gatekeepers, the singers, and the Levites had been appointed, I gave my brother Hanani and Hananiah the governor of the castle charge over Jerusalem, for he was a more faithful and God-fearing man than many. And I said to them, “Let not the gates of Jerusalem be opened until the sun is hot. And while they are still standing guard, let them shut and bar the doors. Appoint guards from among the inhabitants of Jerusalem, some at their guard posts and some in front of their own homes.”
Nehemiah 7:1-3 ESV
Though the wall was now finished, Nehemiah did not cease taking precautions. He realized that they were still subject to attack, and rather than open the gates at dawn, as most cities did, he directs, “Do not open them until the sun is hot.” This would preclude any possibility of a surprise attack while the people were still sleeping. He appoints residents to stand guard at the vulnerable points of the city wall.
This is teaching us that we must never let down our guard. How many men of prominence in the Christian life have we seen fall in their later years because they let down their guard and ceased to do battle with the enemy!
The rest of the chapter is given over to preserving the purity of the doctrine that God has taught, and the commitment of the Jews to the cause. It was necessary to ensure that only true Israelites lived within Jerusalem.