He escaped to Ryuko-ji Temple in Tanba Province during the Onin War (1467-1477), and received an Imperial order from the Emperor Gotsuchimikado after the war to revive Daitoku-ji Temple, Myoshin-ji Temple and Ryoan-ji Temple with support from Katsumoto HOSOKAWA and Masamoto HOSOKAWA.
応仁の乱（1467年－1477年）の間は丹波国龍興寺に難を逃れたが、乱後は後土御門天皇の勅命を受け、細川勝元・細川政元の援助を受けて大徳寺・妙心寺・龍安寺を再興した。