It is said that Emperor Tenmu, having won the Jinshin War and acceded to the Imperial throne, built a temple in the place where the cherry tree he had dreamed of was standing (Hinoo Rikyu).
その後、壬申の乱に勝利し，皇位に着いた天武天皇は、夢で見た桜の木の場所（日雄離宮）に寺を建立したとされる。