Acting as a judge in lawsuits was one of many duties of the Magistrates of counties and Administrators of commanderies. Complex, high profile or unresolved cases were often deferred to the Minister of Justice in the capital or even the emperor. In each Han county was several districts, each overseen by a chief of police. Order in the cities was maintained by government officers in the marketplaces and constables in the neighborhoods.