Emperor Tenmu
A shrine structure was erected in 678 during the reign of the Emperor Tenmu, and this became the principal building during the reign or of the Emperor Kanmu when he removed the capital from Nara to Heian-kyō.