Machidai (町代)
"Machidai" was a town official in Kyoto in the Edo period. Machidai originally represented Kyoto citizens as a manager of town officials; Later, it became authorized to act as a proxy in execution of secretarial works of the Kyoto city magistrates, gradually recognized as a subordinate organization of the city magistrates.
Some town officials in Edo and Osaka adopted another way of pronunciation 'Chodai' for 'Machidai' and assisted town councilors and town chief.
In contrast, Machidai in Kyoto headed town officials including the town chiefs: There was one Machidai for each group of towns (i.e., each district) with one or two subordinate Machidai below, for heading town officials including town chief in each town of the group (Kamigyo area had 12 groups of towns and Shimogyo area had 8 groups of towns). There was documents exchanged between Machidai and the Kyoto city magistrates called 'Machidaiyaku no Oboe' consisting of 17 Articles compiled on January 7, 1669 (prior to the establishment of the Kyoto city magistrates), which states duties of Machidai as follows: Outside works of transmission of ordinance and notification issued by the city magistrates, submission of various applications and written reports entrusted by the town, New Year visit to the shogun in Edo-jo Castle as a representative of Kyoto citizens, collection of levy from towns, examination of the scene of a fire and a confiscated estate, and patrol; and Machidai alternately does desk works in Machidai room of the Kyoto city magistrates' office to assist court clerical on the day when a court is held. Several clerks (up to six) and a copyist were assigned to the Machidai room for miscellaneous duties and note taking. Generally, these roles were inherited by the selected influential town chiefs, and their salaries called 'Yakugin' and the maintenance costs of the Machidai room were charged to the towns. During the Kyoho era (1716-1735), the duties of Machidai were expanded to cover supervising temples and shrines, examination of replacement of the town officials and purchase and sale of an estate, guard at festivals and events, arrest of a criminal, participation in city magistrates' examination, and so on. As ordinance and convention had been established in the towns in Kyoto before the Edo period, which ranged too wide for police sergeants and constables to comprehend, it became also an important duty for Machidai to answer the questions from the police sergeants and constables based on the precedents--As such, Machidai became authorized to act as a proxy in execution of secretarial works necessary for facilitating the duties and operations of the Kyoto city magistrates' office, thereby contributed to keep organization of the city magistrates' office.
Machidai, a townsman who originally represented the Kyoto citizens, gradually built up a position in the Kyoto city magistrates' office, and also formed relationship with the court nobles, temples, and shrines, which were quite influential in legislature and administration of Kyoto. To counter the trend, the Kyoto city magistrates managed to keep the class system and the Kyoto citizens had antipathy toward Machidai, who had become the ruler's proxy--Machidai caught between these two sides. To make matters worse, as the position of Machidai was hereditary, some incompetent Machidai emerged. From 1871 to 1872, the groups of towns filed a suit against Machidai ('Machidai kaigi' suit) and the city magistrates supported the groups side, which made a great impact on Machidai.