Japanese construction techniques and architectural styles changed in the eighth century C.E. from more traditional Japanese models to imported continental (especially Chinese) models. Several factors contributed to this, in particular with respect to the creation of two new capital cities. In essence, changes then occurring in Japanese political life were rendering past arrangements for the rulers' headquarters obsolete, and continental models offered an alternative. To elaborate, before the eighth century, the elite marriage practice, which was an important instrument of political alliance making, had encouraged rulers to maintain multiple palaces: that of their own family and those of their spouses, who commonly remained at or near their native family headquarters, at least for some years after marriage. These arrangements had the effect of encouraging frequent changes in royal residence as children matured and marriage alliances changed. The customs of multiple palaces and a movable court were feasible as long as a ruling group was modest in size and its architectural practices relatively simple. Moreover, because buildings using the traditional construction of thatched roofs and wooden poles placed directly in the ground rotted away in two decades or so, periodic replacement of palaces, shrines, warehouses, gate towers, and fortress walls was essential. The custom of residential mobility was thus not especially wasteful of labor and material resources: when the time came, one simply erected a new building at a new site – reusing valuable timbers as appropriate – and burned the rest. The practical necessity of replacement was given religious sanction because the regular replacement of buildings was regarded as necessary to provide spiritual cleansing of the site. As rulers of the sixth and seventh centuries expanded their realm, however, they acquired more and more underlings, administrative paraphernalia, weaponry, and tribute goods, and they needed more and more buildings to house them. As the scale of government grew, moreover, it became more important to have these people and resources close at hand where they could be more easily controlled and utilized. Under these circumstances, frequent moves by the court or replacement of buildings became more costly, even prohibitive. A solution to the problem was advocated by experts from the continent. This was the use of continental principles of urban design and techniques of construction. These produced geometrically laid out capital cities whose major gates and buildings employed stone foundations, mortise-and-tenon framing (a technique for attaching timbers), and tile roofs that largely eliminated the problem of rot and the consequent need for replacement. On the other hand, to construct cities and buildings of that sort required so much labor and material that their use effectively precluded periodic replacement or the transfer of a royal headquarters from site to site. Nevertheless, the notion of grand buildings and capital cities became immensely attractive to Japanese rulers during the seventh and eighth centuries. Continental regimes, the glorious new Chinese dynasties most notably, had them: they constituted an expression of political triumph, a legitimizing symbol of the first order. Moreover, the architecture was an integral part of Buddhism, and acceptance of this religion in Japan at this time fostered adoption of its building style. These several conflicting factors – the need to modify palace and capital arrangements but the difficulty of doing so, the wish to enjoy grandeur but the reluctance to settle for a single, immobile court – all became evident by the mid-seventh century. Change did come, but slowly, and in the end a compromise system was devised. Traditional shrines of Shinto, the native religion of Japan, and many residential buildings continued to be built in the rotatable, replaceable style that accommodated religious concerns and taboos, while city gates, major government buildings, and Buddhist temples were built in the continental fashion that met the need for permanence and grandeur. Moreover, the wish of rulers to maintain multiple palaces fit with the custom of certain continental regimes that maintained summer palaces or other regional capitals where rulers could periodically reside on a temporary basis.