The priests and Levites first purified themselves, then they purified the people, the gates, and the wall.