The shrine tradition says that Emperor Keitai determined the holy precincts of the shrine by building Angu (temporary lodging to accommodate an Imperial visit) beside the shrine and rebuilding a main building of the shrine when he went to Kyoto from Echizen (present Fukui Prefecture).
社伝によれば、継体天皇が越前から上京する際に、当社のそばに行宮を設け、社殿を再建して神域を定めたとされている。