Uji is a small city situated between Kyoto and Nara, two of Japan's most famous historical and cultural centers. Its proximity to these two former capitals resulted in Uji's early development as a cultural center in its own right. At the height of political power of the Fujiwara clan in the Heian Period (794 to 1192), buildings such as Byodoin Temple and Ujigami Shrine, the oldest extant shrine in Japan, were contructed in Uji.