Jinaimachi (Jinaichà Â, , 'town within the temple precincts') is a historical self-governing settlement, town or city that formed in Japan from the late medieval period to the early modern period, centered around Buddhist temples and dojos (gobà Â), mainly built by the Jà Âdo Shinshà « sect. Often, jinaimachi had defensive buildings, such as being surrounded by moats and earthen ramparts, and were home to believers, merchants, and artisans.
The name jinaimachi (also jinaichà Â) literally means "town (çº) inside (å ) the temple" (寺), a name that originated from the principle that the entire settled area was regarded as an extension of the temple precincts. This distinguishes jinaimachi from the superficially similar monzenmachi (éÂÂÃ¥ÂÂçº, "town in front of (Ã¥ÂÂ) the gate (éÂÂ)"), developed outside the gates to serve pilgrims and travellers.
The immediate institutional precursor of the jinaimachi was the fortified mission compound established by the Jà Âdo Shinshà « prelate Rennyo (è®å¦Â; 1415âÂÂ1499), the eighth head priest called monshu of Hongan-ji, who is traditionally recognized as the restorer of the Jà Âdo Shinshà « sect. Rennyo conducted extensive missionary campaigns across the Kinai region and the Hokuriku provinces gathering large numbers of lay followers (éÂÂå¾Â, monto) and founding local branch alls as bases for their communities.
The earliest precursor of the jinaimachi type is generally identified as the Yoshizaki-gobà  compound (Ã¥ÂÂå´Â御åÂÂ), which Rennyo established in 1471 in Echizen Province (present-day Awara City, Fukui Prefecture). Rennyo erected a fortified residence on a hilltop promontory overlooking Lake Kitagata, and large numbers of followers gathered in the settlement below it. The first settlement to be formally constituted as a jinaimachi is, however, generally identified as the Yamashina Hongan-ji (å±±ç§ÂæÂ¬é¡Â寺), which Rennyo constructed in Yamashiro Province (present-day Yamashina-ku, Kyoto) beginning in 1478. By 1479 it had grown to encompass eight residential districts inhabited by lay believers, making it the earliest planned religious urban settlement of this type. Scholars have compared the spatial design of Yamashina Hongan-jiâÂÂwith its concentric defensive circuits of earthen ramparts, moats and guarded gatesâÂÂto that of a flatland castle, and have described it as the earliest example of castle-town-style urban planning in Japan.
Following the destruction of Yamashina Hongan-ji by hostile forces in 1532, the head priest Shonyo relocated to the à Âsaka-gobà  compound at IshiyamaâÂÂthe site of the modern Osaka CastleâÂÂwhich had been built by Rennyo in 1496. This compound, known to history as Ishiyama Hongan-ji (ç³山æÂ¬é¡Â寺), was progressively expanded into a fully-fledged fortified jinaimachi that at its height encompassed ten residential districts within its walls, and supported a variety of commercial activities that made it one of the most important urban centres in the Kinai region.
A jinaimachi combined religious, residential and defensive elements in a single planned settlement. At its core stood the principal temple building or gobà Â, flanked by residences for clergy and religious staff. Surrounding these were the town blocks housing lay believers, merchants and craftspeople. The entire settlement was then encircled by one or more defensive rings consisting of earthen embankments and water-filled moats, with access to the interior controlled through guarded wooden gates and guardhouses. The internal street grid was typically laid out in a rectilinear pattern.
The Kyà «hà Âji Jinaimachi (ä¹ å®Â寺寺å çº), located in what is now Yao, Osaka, provides one well-documented example of a fully articulated defensive plan. According to a town map believed to date from the Kan'ei period (1624âÂÂ1644), the moats were fed from the Yamato River and formed two concentric rings separated by earthen banks; the town was entered through six gates at the cardinal and intercardinal points, each equipped with a wooden barrier and a guardpost. The settlement covered an area of approximately 200 by 150 metres.
In many documented cases, the choice of site followed a consistent logic. As a general pattern, jinaimachi were founded at points where overland and waterway transport routes converged, giving the settlements access to markets and the means to accumulate commercial wealth.
The defining legal characteristic of jinaimachi was their status as privileged spaces shielded from the jurisdiction of outside lords, conferring on them a quality scholars have described as ajiru. This status was expressed through the institution of funyà « (ä¸Âå ¥, no entry), which barred samurai and the retainers of overlords from entering the settlement in order to carry out arrests, levy dues or execute sentences. Many jinaimachi additionally obtained from overlords the formal right to exercise kendan (æ¤ÂæÂÂ) authorityâÂÂthe power of policing, criminal investigation and adjudicationâÂÂwithin their own precincts, independently of the surrounding domain.
Beyond self-policing rights, jinaimachi were typically exempt from a wide range of dues and obligations that weighed upon ordinary settlements. These included: guild tolls called za (座), whose abolition allowed jinaimachi merchants to trade without paying to established commercial monopolies; public service levies; tokusei-rei that might otherwise void the commercial credits extended by town merchants; and the property-seizure practices by which lords could extract payment from debtors residing elsewhere in the domain. The nengu on jinaimachi residents was also maintained at a level lower than that levied on the surrounding agricultural villages.
Day-to-day governance was conducted by a council of local headmen operating within the framework of the communal self-governing body called sà Â, which oversaw matters of public order, taxation, maintenance of the defensive infrastructure and internal dispute resolution.
The combination of tax exemptions, freedom from guild restrictions and privileged access to trade routes allowed jinaimachi to attract merchants, artisans and craftspeople of many specializations. The great à Âsaka jinaimachi of Ishiyama Hongan-ji functioned as a major commercial hub for the entire Kinai region, with its internal districts organized around distinct trades. In the case of smaller provincial jinaimachi such as Tondabayashi in Kawachi Province, the economic specialization lay in agricultural products, cotton, timber, rapeseed oil and sake brewing, traded with the surrounding rural hinterland.
The prosperity of Imai in Yamato Province became proverbial. In the Edo period, a saying circulated that "seven-tenths of Yamato Province's wealth is in Imai" (大åÂÂã®éÂÂã¯ä¸ÂÃ¥ÂÂãÂÂä»ÂäºÂ), and the town was habitually paired with the great port city of Sakai in the phrase "Sakai of the sea, Imai of the land" (æµ·ã®堺ãÂȎ¸ã®ä»ÂäºÂ).
Because jinaimachi were built in the context of Jà Âdo Shinshà «'s confrontation with both established Buddhist institutions and secular lords, many of them served simultaneously as religious, commercial and military strongholds during the Ikkà Â-ikki uprisings of the fifteenth and sixteenth centuries. The Kaga Ikkà Â-ikki established what contemporaries described as "a province ruled by peasants" (ç¾å§Âã®æÂÂã¡ãÂÂãÂÂå½) following the defeat of the military governor Togashi Masachika in 1488, with jinaimachi settlements at its administrative and military core. The jinaimachi of Yoshizaki, Inami and Kanazawa all figured prominently in these conflicts, and the moats and walls that had originally been erected to guarantee religious autonomy now served as military fortifications.
Jinaimachi were not an exclusively Jà Âdo Shinshà « phenomenon. The Hokke-shà « (Nichiren sect) also established settlements of the type: the temples Honkà Â-ji (æÂÂÂ寺) and Chà Âon-ji (é·é 寺) in Amagasaki in Settsu Province each formed their own jinaimachi, although these remained exceptions to the dominant Jà Âdo Shinshà « pattern.
The political settlements imposed successively by Oda Nobunaga and Toyotomi Hideyoshi during the late sixteenth century systematically eroded the institutional foundations of jinaimachi. The surrender of Ishiyama Hongan-ji to Nobunaga in 1580, after a decade-long siege known as the Ishiyama War (ç³山åÂÂæÂ¦), removed the most powerful centre of jinaimachi-based autonomy in Japan. Subsequently, Hideyoshi's and Tokugawa Ieyasu's cadastral surveys called kenchi (æ¤ÂçÂÂ¥) stripped individual jinaimachi of their accumulated tax immunities and self-governing privileges, integrating them into the emerging early-modern administrative structure of han domains.
Kyà «hà Âji jinaimachi, for instance, submitted to a survey in 1612 and formally surrendered its right of self-governance after a lifespan of approximately seventy years as a privileged settlement. Settlements that survived the transition generally did so by reinventing themselves as ordinary commercial market towns called zaigà Âmachi (å¨é·çº), retaining their inherited advantages of location and infrastructure rather than relying on religious or political privilege.
A notable exception was Imai-chà  in Yamato Province, whose townspeople negotiated a continuing degree of municipal autonomy in exchange for their surrender to Nobunaga in 1575 and which continued to function as a thriving small commercial city throughout the Edo period.
Jinaimachi are regarded by historians as among the most sophisticated achievements of medieval Japanese urban planning, integrating the functions of religious, economic and political organization within a single defensible settlement. Some surviving jinaimachi have been designated Groups of Traditional Buildings (éÂÂè¦Âä¼Âçµ±çÂÂ建é ç©群ä¿ÂÃ¥ÂÂå°åº) by the Japanese government:
The following is a selective list of notable jinaimachi, organised by historical province. Those with surviving traditional streetscapes of note are indicated.