The shrine was burned down in the battle of the Onin War but it was rebuilt later and did not changed its place of enshrinement even after the Kazan-in family moved to another place and the surrounding area went through a transition to Kugemachi (court noble village), and it was finally enshrined in the Imperial Gardens due to the transfer of the capital to Tokyo by Emperor Meiji and it was ranked as a fusha (a prefectural shrine) in 1875.
応仁の乱の兵災に罹り焼亡したが、その後再建され、周辺一帯の公家町化の過程で、花山院家が転宅した後も鎮座地を変えず、明治天皇の東京遷都によって御苑内鎮座となり、明治8年（1875年）に府社に列した。