Ujigami Shrine houses the spirits of the Ujinowaki-Iratsuko, Ojin and Nintoku Emperors (semi-legendary emperors).
According to Japan’s oldest history book, “Nihon-Shiki”, the Emperor Ujinowaki-Iratsuko was the son of the Ojin Emperor and had to violently defend his throne from his usurping brother Nintoku. Following such a battle, he committed suicide in Uji. The main building was constructed in the latter part of Heian period and is the oldest shrine architecture standing today.