It seems that it was established during the period of Emperor Saga (around the Jowa era (834 - 848) in Japan), and Emperor Uda repaired it and lived there after the abdicating the throne.
嵯峨天皇の時代（承和(日本)年間頃）に成立したと見られ、宇多天皇が整備して譲位後に居住。