In 667, a year after Omikyo-sento (Transferring of the national capital to Omi Kyo), the god of Omiwa shrine was transferred to Hiyoshi Taisha Shrine for the sake of protecting Otsu kyo (Shiga Prefecture).
近江京遷都の翌年である天智天皇7年、大津京鎮護のため大神神社の神を勧請した。