[3] During the Edo period the authoritarian Tokugawa shogunate instituted an elaborate police/security state, an administrative hierarchy was developed, and rules and regulations controlling many aspects of life in Japan went into effect.
During the Edo period, high ranking samurai with an allegiance to the Tokugawa shogunate (hatamoto) were appointed machi-bugyō (city administrators or commissioners).
The machi-bugyō performed the roles of chief of police, prosecutor, judge and other judicial related business both criminal and civil in Edo and other major towns.
Dōshin were samurai but of a lower class than yoriki—they performed the duties of prison guard and patrol officer which required close contact with commoners (chonin).
[10] Edo period police relied heavily on commoners for assistance, from average village dwellers to the outcast hinin and eda castes.
[13] Gōyokiki or meakashi were a non-samurai chōnin or outcast class who were hired by local residents and merchants to work as police assistants in a particular neighborhood—they were often former criminals.