"Yamashiro" was formerly written with the characters meaning "mountain" () and "era" (); in the 7th century, there were things built listing the name of the province with the characters for "mountain" and "ridge"/"back" (). On 4 December 794 (8 Shimotsuki, 13th year of
Enryaku), at the time of the establishment of
Heian-kyō, because
Emperor Kanmu made his new capital utilize the surroundings as natural fortification, the character for
shiro was finally changed to "
castle" (). Later
shiro from the province name replaced the older
ki as the Japanese reading for the character 城. Just from
Nara period writings, it is apparent that the "area" () and "ridge" () listings coexisted. The provincial capital, according to the
Wamyō Ruijushō, was . In the
Shūgaishō,
Otokuni District is mentioned as the seat, as well as in the
Setsuyōshū. As for the
shugos mansion, at first, Yamashiro Province shugo and Kyoto shugo were concurrent posts, so the Kyoto shugo's
kogeninmansion had to be allotted. Afterwards, the
Rokuhara Tandai came to be an additional post, and that became the shugo as well. In the
Muromachi period, Yamashiro Province was divided with the
Uji River as the border into two districts, and each came to be assigned a shugo, so one shugo resided in Uji Makishima, whereas the other resided in various places around Yodo and such. A European geographical dictionary published in 1697, well into the
Tokugawa period, describes "Yamaxiro" as a "kingdom in Japan," with "Meaco" (Miyako, i.e. Kyoto) as its "capital." ==Temples==