Danrin-ji Temple fell into disrepair over the next four hundred years and Emperor Gosaga (reigned 1242 - 1246) and his son Emperor Kameyama (reigned 1259 - 1274) turned the area into an Imperial villa which they called 'Kameyama-dono Palace.'
その後約4世紀を経て荒廃していた檀林寺の地に後嵯峨天皇（在位1242－1246）とその皇子である亀山天皇（在位1259－1274）は離宮を営み、「亀山殿」と称した。