Machi-bugyō (町奉行 machi-bugyō?) were samurai officials of the Tokugawa shogunate in Edo period Japan, this was amongst the senior administrative posts open to those who were not daimyō. Conventional interpretations have construed these Japanese titles as "commissioner" or "overseer" or "governor."
This bakufu title identifies a magistrate or municipal administrator with responsibility for governing and maintaining order in what were perceived to be important cities.
The machi-bugyō were the central public authority in the Japanese urban centers of this period. These bakufu-appointed officers served in a unique role, which was an amalgam of chief of police, judge, and mayor. The machi-bugyō were expected to manage a full range of administrative and judicial responsibilities.
The machi-bugyō was expected to be involved in tax collection, policing, and firefighting; and at the same time, the machi-bugyō needed to play a number of judicial roles – hearing and deciding both ordinary civil cases and criminal cases.
Only high-ranking hatamoto were appointed to the position of machi-bugyō because of the critical importance of what they were expected to do. The machi-bugyō were considered equal in rank to the minor daimyō. There were as many as 16 machi-bugyō located throughout Japan.
During this period, a number of urban cities—including Edo, Kyoto, Nagasaki, Nara, Nikkō, and Osaka—were considered important; and some were designated as a "shogunal city." The number of such "shogunal cities" rose from three to eleven under Tokugawa administration.